activemq | activemqspringjms - | Application Framework library

 by   zhaiyz Java Version: Current License: No License

kandi X-RAY | activemq Summary

kandi X-RAY | activemq Summary

activemq is a Java library typically used in Server, Application Framework, Spring Boot, Spring applications. activemq has no bugs, it has build file available and it has high support. However activemq has 8 vulnerabilities. You can download it from GitHub.

activemq
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              activemq has a highly active ecosystem.
              It has 13 star(s) with 22 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              activemq has no issues reported. There are no pull requests.
              OutlinedDot
              It has a negative sentiment in the developer community.
              The latest version of activemq is current.

            kandi-Quality Quality

              activemq has 0 bugs and 0 code smells.

            kandi-Security Security

              OutlinedDot
              activemq has 8 vulnerability issues reported (1 critical, 3 high, 3 medium, 1 low).
              activemq code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              activemq does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              activemq releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              activemq saves you 116 person hours of effort in developing the same functionality from scratch.
              It has 294 lines of code, 19 functions and 6 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            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.
            • Send a message
            • Gets the message
            • Get the current semaphore
            • On JMS message
            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

            Spring Boot connection to SQL Server in Windows Authentication mode
            Asked 2022-Apr-17 at 23:55

            I am new in Spring Boot, I am trying to connect to SQL Server in Windows Authentication mode and here is my database configuration:

            ...

            ANSWER

            Answered 2022-Apr-17 at 23:55

            I found the solution and it was only to use

            integratedSecurity = false;

            instead of

            integratedSecurity = true;

            so in this case connection string will be:

            database.name= DatabaseName spring.datasource.url=jdbc:sqlserver://1.2.3.4:11111;DatabaseName=${database.name};integratedSecurity = false;.

            Why to use integratedSecurity = false? The reason is here:

            "Integrated Security When false, User ID and Password are specified in the connection. When true, the current Windows account credentials are used for authentication."

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

            QUESTION

            Why my REST api created with camel servlet doesn't expose?
            Asked 2022-Mar-27 at 23:58

            I'm currently struggling with exposing the REST api in my project using Apache Camel. When I run the project it seems to be fine in the console, but it just doesn't work:

            curl http://127.0.0.1:8080/materials

            curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused

            Here's the pom.xml file:

            ...

            ANSWER

            Answered 2022-Mar-25 at 16:33

            The component camel-servlet is not meant to be used in standalone mode as you are trying to do. It is meant to be used when you deploy your Camel application on a Servlet container or an Application Server.

            In standalone mode, if you want to expose a rest endpoint, you should rather use a component like camel-undertow, camel-jetty, camel-netty-http or camel-platform-http (you can find the full list here).

            Assuming that you want to use undertow, you will have to follow the next steps

            In your pom file you need to replace camel-rest with camel-undertow, as next:

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

            QUESTION

            Making a bean parameter optional
            Asked 2022-Mar-25 at 17:30

            I have the below route and bean to get the message from the property file. In some message I have to replace the arguments in the message. Therefore I have looked for a solution without writing 2 methods in the bean one with arguments (getMessageWithArgs) and the second without arguments (getMessage).

            Is it doable to get rid of getMessageWithArgs in the bean by using DSL in the route or to make the arguments in the getMessage optional so I have at the end one method in the bean?

            Route

            ...

            ANSWER

            Answered 2022-Mar-25 at 17:18

            I think Arbitrary Number of Arguments may work for you.

            http://java.sun.com/docs/books/tutorial/java/javaOO/arguments.html#varargs

            So the Bean now will be only one like:

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

            QUESTION

            ActiveMQ Artemis cluster on Docker Swarm
            Asked 2022-Mar-18 at 13:53

            I am trying to setup simple cluster of 2 ActiveMQ Artemis brokers within Docker Swarm environment.

            Stack configuration

            ...

            ANSWER

            Answered 2022-Mar-18 at 13:53

            The connector named "netty_connector" shouldn't use 0.0.0.0. This is the address that will be sent to other nodes in the cluster to tell them how to connect back to the node who sent it. The address 0.0.0.0 will be meaningless in that context. It needs to be the actual IP address or hostname where the broker is listening for network connections.

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

            QUESTION

            Alternatives to JMS Queue Browser for STOMP over ActiveMQ?
            Asked 2022-Mar-07 at 17:18

            My ActiveMQ messaging instance (ActiveMQ 5.16.2 on Amazon MQ) uses STOMP. I cannot use the JMS QueueBrowser, and there is no way to "unack" a message. As soon as there is a consumer that pulled that message from the queue i.e. marked as "unconsumed" as stated in the docs here.

            Assuming the broker cannot be changed, I was looking at the REST API mapping of JMS here, but I do not see any endpoint that mimic the ActiveMQ admin pages (JSP), that is capable to browse the queue, consumers and message content without actively "pulling" those messages from the queue.

            So, how to implement that JMS logic we can see in the ActiveMQ admin pages programmatically (e.g. via REST apis)?

            Looking at the docs of REST API, assumed having the logon, this approach works

            ...

            ANSWER

            Answered 2022-Mar-07 at 17:15

            The REST/JMS mapping doesn't offer any message browsing functionality.

            However, it's worth noting that the REST/JMS mapping is independent of the management functionality exposed by Jolokia. Jolokia is an HTTP-JMX bridge so anything exposed via JMX can be accessed via HTTP (e.g. using curl). The DestinationViewMBean has various "browse" methods you can use, e.g.:

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

            QUESTION

            Create DLQ per-consumer in ActiveMQ Artemis
            Asked 2022-Mar-04 at 21:15

            I'm consuming messages from an ActiveMQ Artemis topic using JMS. My consumers are connecting directly to the FQQN of their consumer queues. Like this:

            ...

            ANSWER

            Answered 2022-Mar-04 at 16:18

            It's not possible to configure the broker to auto-create a dead-letter queue whose name contains the name of the queue where the message was originally sent. As noted in the documentation, the dead-letter queue is named according to the address where the message was originally sent along with any configured prefix and/or suffix.

            However, the message itself will have a property named _AMQ_ORIG_QUEUE which will contain the name of the queue where the message was originally routed. This means you can use a consumer with a message selector (e.g. _AMQ_ORIG_QUEUE = 'ConsumerA') so that the consumer will only receive messages which were originally routed to a particular queue. This is functionally equivalent to having a dead-letter queue per-queue.

            For what it's worth, what you're calling the "consumer name" isn't the name of the consumer at all, at least not from the broker's point of view. It's just the name of the queue.

            Ultimately it's just not possible to configure a dead-letter queue per-queue. It's only possible to configure a dead-letter queue per address. This is true whether the resources are create manually (e.g. via broker.xml) or automatically.

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

            QUESTION

            How to provide a custom broker.xml to ActiveMQ Artemis broker instance
            Asked 2022-Feb-17 at 15:39

            How can I provide a custom broker.xml to my instance of ActiveMQ Artemis? The standard implementation generates the config data in the broker instance's etc directory but I wish to mount my own config files.

            ...

            ANSWER

            Answered 2022-Feb-17 at 15:39

            If you're starting the broker with the artemis run command then you can pass the location of a custom bootstrap.xml, e.g.:

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

            QUESTION

            ActiveMQ Artemis data journal folder
            Asked 2022-Feb-03 at 14:42

            I am trying to understand how ActiveMQ Artemis manages the journal files (under data/journal) and when it creates new ones. I read the documentation, but it wasn't clear how the files are create. I have a broker.xml has simple settings (won't be able to share unfortunately). Here are a few:

            • journal min threads - 2
            • journal pool size - 50
            • file size is defaulted to 10MB.

            ActiveMQ Artemis starts, and I see 2 files are already created under /data/journal. I am now running a request that posts a lot of messages in a very short time. These messages are being actively consumed. I am publishing a lot of messages but they are not accumulating as fast because the consumer is consuming them. However, this doesn't cause the files to grow to recreate the space issue.

            As the message volume is going up I don't see the number of files going up. It goes up and stays at 12 files for a long time. I can understand the message # is not sufficient trigger additional files if only the latest journal file is being written to. However, I see all the 11 files have updated timestamps making me think they are being rotated.

            My paging directory is empty.

            I am trying to understand why the journal is not growing despite the message volume.

            ...

            ANSWER

            Answered 2022-Feb-03 at 14:42

            From what I can tell, message consumption has reached a break-even point with message production so that messages are not accumulating on the broker therefore the journal is not actually growing in size. The journal files are simply being re-used as messages are being added & acknowledged.

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

            QUESTION

            Stomp Client in Web Browser without Websockets
            Asked 2022-Feb-02 at 19:34

            I have a Node.js app in which I use stomp-client to connect and subscribe to an ActiveMQ topic without websockets. My code is the same as this example: https://www.npmjs.com/package/stomp-client#super-basic-example.

            Now, I want to do the same thing, but with a Vue.js application. So, I want to subscribe to an ActiveMQ topic in the browser (i.e., in JavaScript, not in Node.js). My ActiveMQ is not configured to support websockets. Is it possible to do this in a browser without websockets?

            This is the error I'm getting:

            ...

            ANSWER

            Answered 2022-Feb-02 at 19:34

            No, this is a security constraint that is part of web standards.

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

            QUESTION

            Apache ActiveMQ Artemis transform TextMessage to ObjectMessage
            Asked 2022-Feb-02 at 17:23

            I have a use case where I need to convert a message from one type to another (i.e. TextMessage -> ObjectMessage).

            I found that when diverting between queues there is an option to transform the message. I have implemented the Transformer interface as instructed in the documentation.

            ...

            ANSWER

            Answered 2022-Feb-02 at 17:23

            It should technically be possible to convert a javax.jms.TextMessage to a javax.jms.ObjectMessage, but it may be cumbersome. Here are some important things to note:

            • javax.jms.TextMessage, javax.jms.ObjectMessage, and org.apache.activemq.artemis.api.core.Message are all just interfaces. The javax version is what you use on the client and Message is what is used on the broker. The data for each type of message is stored differently in the underlying message implementation.
            • The class for the Java object that you wish to put into the ObjectMessage will need to be on the broker's classpath. This isn't required under normal circumstances as the broker itself will never serialize or deserialize the object.
            • You should really try to avoid ObjectMessage whenever possible. ObjectMessage objects depend on Java serialization to marshal and unmarshal their object payload. This process is generally considered unsafe (and slow!), because a malicious payload can exploit the host system. Lots of CVEs have been created for this. For this reason, most JMS providers force users to explicitly whitelist packages that can be exchanged using ObjectMessage messages. For example, here's the related documentation for ActiveMQ Artemis. There are a number of other issues with using JMS ObjectMessage not related to security that you should read about.

            Granted you understand all that you should be able to convert the message using code something like this:

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

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

            Vulnerabilities

            The compilation daemon in Scala before 2.10.7, 2.11.x before 2.11.12, and 2.12.x before 2.12.4 uses weak permissions for private files in /tmp/scala-devel/${USER:shared}/scalac-compile-server-port, which allows local users to write to arbitrary class files and consequently gain privileges.
            A regression has been introduced in the commit preventing JMX re-bind. By passing an empty environment map to RMIConnectorServer, instead of the map that contains the authentication credentials, it leaves ActiveMQ open to the following attack: https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html "A remote client could create a javax.management.loading.MLet MBean and use it to create new MBeans from arbitrary URLs, at least if there is no security manager. In other words, a rogue remote client could make your Java application execute arbitrary code." Mitigation: Upgrade to Apache ActiveMQ 5.15.13
            Apache ActiveMQ uses LocateRegistry.createRegistry() to create the JMX RMI registry and binds the server to the "jmxrmi" entry. It is possible to connect to the registry without authentication and call the rebind method to rebind jmxrmi to something else. If an attacker creates another server to proxy the original, and bound that, he effectively becomes a man in the middle and is able to intercept the credentials when an user connects. Upgrade to Apache ActiveMQ 5.15.12.
            The optional ActiveMQ LDAP login module can be configured to use anonymous access to the LDAP server. In this case, for Apache ActiveMQ Artemis prior to version 2.16.0 and Apache ActiveMQ prior to versions 5.16.1 and 5.15.14, the anonymous context is used to verify a valid users password in error, resulting in no check on the password.
            In Apache ActiveMQ 5.0.0 - 5.15.8, unmarshalling corrupt MQTT frame can lead to broker Out of Memory exception making it unresponsive.

            Install activemq

            You can download it from GitHub.
            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/zhaiyz/activemq.git

          • CLI

            gh repo clone zhaiyz/activemq

          • sshUrl

            git@github.com:zhaiyz/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