activemq | Mirror of Apache ActiveMQ | Websocket library

 by   apache Java Version: activemq-5.18.1 License: Apache-2.0

kandi X-RAY | activemq Summary

kandi X-RAY | activemq Summary

activemq is a Java library typically used in Networking, Websocket, Kafka applications. activemq has no bugs, it has build file available, it has a Permissive License and it has medium support. However activemq has 2 vulnerabilities. You can download it from GitHub, Maven.

Welcome to Apache ActiveMQ.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              activemq has a medium active ecosystem.
              It has 2155 star(s) with 1379 fork(s). There are 200 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              activemq has no issues reported. There are 42 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of activemq is activemq-5.18.1

            kandi-Quality Quality

              activemq has no bugs reported.

            kandi-Security Security

              activemq has 2 vulnerability issues reported (0 critical, 1 high, 1 medium, 0 low).

            kandi-License License

              activemq is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              activemq releases are not available. You will need to build from source code and install.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed activemq and discovered the below as its top functions. This is intended to give you an instant insight into activemq implemented functionality, and help decide if they suit your requirements.
            • Defines the message queue .
            • Generate the file .
            • Reconnect to the transport .
            • Called when a message is ready .
            • Exports a store to an XA stream .
            • Sends a CONNECT packet .
            • Extracts the section information from an ActiveMQ message .
            • Returns a list of all queues that have no consumers .
            • Configure the target class with the specified key .
            • Process a stanza command .
            Get all kandi verified functions for this library.

            activemq Key Features

            No Key Features are available at this moment for activemq.

            activemq Examples and Code Snippets

            No Code Snippets are available at this moment for activemq.

            Community Discussions

            QUESTION

            ActiveMQ CMS: Is there a way to use it without threading?
            Asked 2021-Jun-08 at 17:07

            I took the sample code from Apache here: https://activemq.apache.org/components/cms/example

            (The producer section specfically) and tried to rewrite it so it doesn't create any threads for producing. And instead, in my program's main thread, creates a producer object and sets up the connection, session, destination, and so on. Then it sends messages using a message producer. This is all done in a singleton so that my program just has one Producer object and just goes to it whenever it needs to dump any message to one of my queues. This example code seems to create a producer for every thread, set it up everytime, just to send a message, then deletes everything. And it does this for every time you want to want to produce something from your program.

            I am crashing right when I try to call send on a message producer with any given message. I found out after some digging that after the send call it tries to lock a mutex and enter a critical section. I guess this is for threading? I don't use threads at all in my code so I guess it crashes because of that... Does anyone know a way to bypass this? I don't want to use multiple threads, I won't need to worry about two threads trying to call send at the same time or whatever the problem is that using mutexes is trying to solve.

            ...

            ANSWER

            Answered 2021-Jun-08 at 17:07

            You don't need to create a thread to run the producer in but internally the library is going to use a couple of threads as that is necessary for meeting the API requirements and also just because you don't use multiple threads doesn't means others won't so the mutex is an internal requirement.

            You are free to modify the example to only create a producer inside the main thread of the application, the example uses two threads because it is acting as both a producer and consumer.

            One likely cause of the error you are receiving is because you did not initialize the ActiveMQ-CPP library:

            Source https://stackoverflow.com/questions/67875457

            QUESTION

            Process pending messages faster in ActiveMQ using concurrent user
            Asked 2021-Jun-08 at 16:36

            I have a queue which is getting consumed by an Spring Boot application. As my Spring Boot application is waiting for response from a REST API its not able to process the incoming messages faster due to which the number of pending messages is increasing on my queue.

            I have done some R&D and came out with the solution which is mentioned below. Kindly help me by reviewing the solution so that I can know whether I am on a right track.

            My current ActiveMQ configuration:

            ...

            ANSWER

            Answered 2021-Jun-08 at 16:36

            Generally speaking, more consumers (especially concurrent consumers) will process messages more quickly than fewer consumers so this looks good from that perspective.

            Source https://stackoverflow.com/questions/67882309

            QUESTION

            ActiveMQ/STOMP Clear Schedule Messages Pointed To Destination
            Asked 2021-Jun-08 at 14:28

            I would like to remove messages that are scheduled to be delivered to a specific queue but i'm finding the process to be unnecessarily burdensome.

            Here I am sending a blank message to a queue with a delay:

            ...

            ANSWER

            Answered 2021-Jun-08 at 04:00

            In order to remove specific messages you need to know the ID which you can get via a browse of the scheduled messages. The only other option available is to use the start and stop time options in the remove operations to remove all messages inside a range.

            Source https://stackoverflow.com/questions/67878771

            QUESTION

            Spring Integration - Producer Queue capacity limitations
            Asked 2021-Jun-08 at 11:10

            Spring Integration - Producer Queue capacity limitations

            We are using Remote partitioning with MessageChannelPartitionHandler to send partition messages to Queue(ActiveMQ) for workers to be pick and process. The job has huge data to process , many partition messages are publishing to queue and the aggregator of response from replyChannnel is failing with timeout of messages as all messages cant be processed in a given time. We also tried to limit messages published to queue by using queue capacity which resulted into server crash with heap dump generated due to memory issues of holding all these partition messages in internal memory.

            We wanted to control the creation of StepExecution split itself , so that memory issue doesn’t occur. Example case is around 4k partition messages are being published to queue and whole job takes around 3hrs.

            Can we control the publishing of messages to QueueChannel?

            ...

            ANSWER

            Answered 2021-Jun-08 at 11:10

            The job has huge data to process , many partition messages are publishing to queue and the aggregator of response from replyChannnel is failing with timeout of messages as all messages cant be processed in a given time.

            You need to increase your timeout or add more workers. The Javadoc of MessageChannelPartitionHandler is clear about that:

            Source https://stackoverflow.com/questions/67884196

            QUESTION

            Number of Consumer threads for JMS Inbound gateway container are multiplied by 3 times the configured value
            Asked 2021-Jun-07 at 05:44

            JMS messages are available in ativeMQ to be picked by worker, worker configuraiton is as above , we wanted to control how many messages workers can proocess, observed that consumers are always multiplied by 3 times for the configuraiton. from above configuration it is observed that 75 consumers are created and 75 task executions(workerPollerTaskExecutor) are running.

            Basically 3 sets of concurrent consumers are being created with same Name(3 threads of senExtractWorkerInGateway.container-1) and same behaviour observed with workerPollerTaskExecutor as well. Can someone help us understanding this why always 3 times multiplied.

            Consumers view from ActiveMq Queue

            ...

            ANSWER

            Answered 2021-Jun-07 at 05:44

            The application context was loading 3 times(due to code issue from our end) causing this behaviour. hope this will helpful for others. Thank you.

            Source https://stackoverflow.com/questions/67816132

            QUESTION

            GMock - Perform an action AFTER Expected calls
            Asked 2021-Jun-05 at 19:21

            I am trying to perform a unit test where I need my mock object to perform an action AFTER a sequence of EXPECT_CALLS, or as an action on one of them while allowing the mocked call to return first.

            Here is my non working unit test:

            ...

            ANSWER

            Answered 2021-Jun-05 at 19:21

            A socket typically behaves asynchronously (i.e., signals are emitted at some indeterminate time after calling methods), but you are setting up the mock object such that it behaves synchronously (signals are emitted immediately as a result of calling the method). You should be attempting to simulate asynchronous behavior.

            Typically, you would achieve this behavior by calling the signal manually (and not as part of an invoke clause):

            Source https://stackoverflow.com/questions/67840889

            QUESTION

            Apache ActiveMQ Artemis MQTT broker refuses connections - possible connection limit
            Asked 2021-Jun-05 at 14:53

            I'm running Apache ActiveMQ Artemis 2.17.0 inside VM for a month now and just noticed that after around 90 always connected MQTT clients Artemis broker is not accepting new connections. I need Artemis to support at least 200 MQTT clients.

            What could be the reason for that? How can I remove this "limit"? Could the VM resources like low memory be causing this?

            After restarting Artemis service, all connection are dropped, and I'm able to connect again.

            I was receiving this message in logs:

            ...

            ANSWER

            Answered 2021-Jun-05 at 14:53

            ActiveMQ Artemis has no default connection limit. I just wrote a quick test based on this which uses the Paho 1.2.5 MQTT client. It spun up 500 concurrent connections using both normal TCP and WebSockets. The test finished in less than 20 seconds with no errors. I'm just running this test on my laptop.

            I noticed that your journal-buffer-timeout is 700000 which seems quite high which means you have a very low write speed of 1.43 writes per millisecond (i.e. a slow disk). The journal-buffer-timeout that is calculated, for example, on my laptop is 4000 which translates into a write-speed of 250 which is significantly faster than yours. My laptop is nothing special, but it does have an SSD. That said, SSDs are pretty common. If this low write-speed is indicative of the overall performance of your VM it may simply be too weak to handle the load you want. To be clear, this value isn't related directly to MQTT connections. It's just something I noticed while reviewing your configuration that may be indirect evidence of your issue.

            The journal-buffer-timeout value is calculated and configured automatically when the instance is created. You can re-calculate this value later and configure it manually using the bin/artemis perf-journal command.

            Ultimately, your issue looks environmental to me. I recommend you inspect your VM and network. TCP dumps may be useful to see perhaps how/why the connection is being reset. Thread dumps from the server during the time of the trouble would also be worth inspecting.

            Source https://stackoverflow.com/questions/67845108

            QUESTION

            Sending metrics from ActiveMQ Artemis to Prometheus
            Asked 2021-Jun-05 at 06:30

            I have a question on which I am stuck and I am not quite sure how to resolve it.

            In my work project I have an ActiveMQ queue and I want to send some metrics to Prometheus which will help me to create some alerts in Grafana. I know that for ActiveMQ Artemis I can use this plugin, but I don't understand 100% how to configure it.

            My application is deployed on a Kubernetes cluster and the ActiveMQ broker is there too. So I have created ActiveMQPrometheusMetricsPlugin class which implements org.apache.activemq.artemis.core.server.metrics.ActiveMQMetricsPlugin. Now is where I get confused right now I should deploy my application and the metrics would be gather by Prometheus? I should do more configuration?

            We usually do not build the application on local env. We are using a pipeline which is building and deploying the app to various envs (dev, test, prod). I should do the configuration similar with the GitHub plugin project, deploy it, and after that find those jars on Kubernetes and move them to the correct location? Also dev-ops said to me that we are using a default conf. I don't know if we have a broker.xml file.

            ...

            ANSWER

            Answered 2021-Jun-03 at 16:09

            There are a couple of important points to understand before getting started:

            • When using the Artemis Prometheus Metrics Plugin neither the broker nor the applications "send" metrics to Prometheus. Prometheus itself must retrieve or "scrape" metrics from the broker. This is why the plugin comes with a servlet. The servlet exposes an HTTP endpoint that Prometheus can use to scrape metrics.
            • The Artemis Prometheus Metrics Plugin is part of the broker infrastructure. It is not to be deployed as part of an application. The plugin's jar and war files are deployed on the broker and configured in broker.xml and bootstrap.xml respectively.

            The Artemis Prometheus Metrics Plugin provides integration with Prometheus using two modules:

            • artemis-prometheus-metrics-plugin: This provides the actual implementation of org.apache.activemq.artemis.core.server.metrics.ActiveMQMetricsPlugin and packages it with the Micrometer and Prometheus dependencies in an "uber" jar.

            • artemis-prometheus-metrics-plugin-servlet: This provides a war file containing a simple servlet which can be deployed to the broker's embedded web server which then Prometheus can use to scrape metrics.

            Once you clone the Artemis Prometheus Metrics Plugin repository simply run mvn install to build these two modules. The output will be in their respective target directories.

            After building the modules follow these steps to deploy and configure the Artemis Prometheus Metrics Plugin. If you have some kind of dev-ops group which manages and configures your broker then they would follow these steps.

            1. Copy artemis-prometheus-metrics-plugin/target/artemis-prometheus-metrics-plugin-.jar to /lib.

            2. Add this to your /etc/broker.xml:

            Source https://stackoverflow.com/questions/67806739

            QUESTION

            get JMSMessageID when use producerTemplate
            Asked 2021-Jun-04 at 18:09

            In Camel,

            ...

            ANSWER

            Answered 2021-Jun-04 at 18:09

            The doc says the JMS MessageID is available as header. So you should be able to return it like this:

            Source https://stackoverflow.com/questions/67831044

            QUESTION

            AMQ Error reading in simpleString, length=xxx is greater than readableBytes=yyy
            Asked 2021-Jun-03 at 17:19

            I'm trying to work out how to fix this ActiveMQ Artemis error.

            Seems the occasional message is too big for SimpleString, and isn't sending, and it goes to the DLQ.

            ...

            ANSWER

            Answered 2021-Jun-03 at 17:19

            The 2.6.3.redhat-00015 version corresponds to AMQ 7.2.3 which is quite old at this point. The current AMQ release is 7.8.1. I strongly recommend you upgrade as it's likely you're hitting a bug that's already been fixed.

            You may be able to work around the issue by increasing the minimum large message size (e.g using minLargeMessageSize on core client URLs or amqpMinLargeMessageSize on your AMQP acceptor). For what it's worth, the stack-trace indicates that the core JMS client (i.e. not AMQP) is in use when the exception is thrown.

            Lastly, it's worth noting that the default minimum large message size is 100 KB not 2 GB as explained in the documentation.

            Source https://stackoverflow.com/questions/67823181

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install activemq

            You can download it from GitHub, Maven.
            You can use activemq like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the activemq component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/apache/activemq.git

          • CLI

            gh repo clone apache/activemq

          • sshUrl

            git@github.com:apache/activemq.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Websocket Libraries

            netty

            by netty

            ws

            by websockets

            websocket

            by gorilla

            websocketd

            by joewalnes

            koel

            by koel

            Try Top Libraries by apache

            echarts

            by apacheTypeScript

            superset

            by apacheTypeScript

            dubbo

            by apacheJava

            spark

            by apacheScala

            incubator-superset

            by apachePython