How to connect to remote weblogic JMS server? - jms

I have a jms server running on weblogic and I need another application running on another server (weblogic as well) to listen to JMS topics sent by the JMS server mentioned before. The fact is that I don't know how to do that. I mean, what do I need on the consumer application side? Thansk in advance.

I know it´s a little old, but could help other people trying to achieve the same.
First you need to enable Cross-Domain Security on both domains envolved on your JMS communication. Please see specific documentation here: https://docs.oracle.com/middleware/1221/wls/SECMG/domain.htm#SECMG402
For reading a message from a JMS resource, there are a ton of examples you can search online, but basically you should rely on Weblogic´s t3 protocol. Here is a relativelly recent example using Spring Boot: Connect to remote jms queue with Spring Boot

Related

Spring integration : control ActiveMQ connection

I am looking for controlling ActiveMQ connections after starting of application in cluster environment if I want to disconnect some slave machine through code.
Any help around this will be really appreciable.
I don't believe Spring has any direct integration with ActiveMQ. Spring offers JMS integration which, of course, uses the generic JMS API which every JMS provider implements.
To manage ActiveMQ from a remote application will you need to use something like JMX.

How should you handle the retry of sending a JMS message from your application to ActiveMQ if the ActiveMQ server is down?

So using JMS and ActiveMQ, I can be sure that my message sent from my Spring Boot application using JmsTemplate will reach it's destination application even if that destination application is down at the time I send the message to ActiveMQ. As when the destination application starts up, it grabs the message from the queue. Great!
However.
What happens if my Spring Boot application tries to send a JMS message to a queue on the ActiveMQ server, but the ActiveMQ server is down at that point or the network is down and I get a connection refused exception?
What is the recommended way to make sure my application keeps trying to re-sends the message to ActiveMQ until it is successful? Is this something I have to develop into my application myself? Are there any nifty Spring tools or annotations which do this for me? Any advice on best practice or how I should be handling this scenario?
You can try Spring-Retry. Has lots of fine grain controls for it:
http://www.baeldung.com/spring-retry
https://github.com/spring-projects/spring-retry
If it is critical that you don't lose this message, you will want to save it to some alternative persistent store (e.g. filesystem, local mq server) along with whatever retry code you come up with. But for those occasional network glitches or a very temporary mq shutdown/restart, Spring-Retry alone should do the trick.
Couple of approaches I can think of
1. You can set up another ActiveMq as fallback. In your code you don't have to do anything, just change your broker url from
activemq.broker.url=tcp://amq01.blah.blah.com:61616
to
activemq.broker.url=failover:(tcp://amq01.blah.blah.com:61616,tcp://amq02.blah.blah.com:61616)?randomize=false
The rest is automatically taken care of. i.e. when one of them is down, the messages are sent to other.
Another approach is to send to a internal queue (like seda, direct) when activemq is down and read from there.
Adding failover to the url is one appropriate way.
And another reasonable way is to making sure activemq always online , as activemq has the master-slave mode(http://activemq.apache.org/masterslave.html) to get high availability.

Sending a JMS message to a remote queue on JBoss AS 5 and AS 7

I have two servers
JBoss as 5.1 with an application sending JMS messages
JBoss AS 7 server with the queue implemented and an MDB consuming messages
I would like to send a message from server one to server two. I would like the message to be consumed on server two.
I think JBoss AS 7 uses HornetQ.
Any hints on how to send a message to a remote queue? I'm more interested on how to send messages because it is on the remote server, and I think the consuming part should be straight forward.
You are correct that JBoss AS 7 uses HornetQ for messaging as the JMS provider. A great resource is the JBoss community documentation for HornetQ. There is also an excellent post on the JBoss community forums about setting up HornetQ across two instances of AS 7.
You will need to define your connectors and acceptors that make up the transports, which in your case will include netty as your client and server are running in different JVMs (otherwise you could use invm). Creating your connection factories will differ on each JBoss AS instance (for example, there is no Management CLI on JBoss AS 5), but the above link will give you a good reference, and you can ask targeted questions in there.

Weblogic JMS server configuration: JMS module to talk to JMS Server

I am fairly to new to JMS configuration in JMS.
Here is what i am trying to do.
We have multile JVMs of our applications in a single weblogic domain. We want to have JMS server installed on say one JVM and rest of the JVMs refer to the first JMS Server.
So, the configuration is:
JVM1: JMS Server is installed
JVM2: JMS Module installed
Now I need to configure JVM2 to talk to JMS server on JVM1. How do i do that?
This is on weblogic 11g
I suggest going through the basics of WebLogic 11 JMS configuration and then taking a look into this good guide from Oracle documentation. I know there is a lot of info over there, but in the long run it is better to know what you are doing rather than just copying someone else's configurations.

How a JMS based Weblogic server can cosume a message created via MSMQ?

I am new to this JMS, MSMQ, Weblogic things and don't have much idea about them. Can someone please guide me regarding my above question - How a JMS based Weblogic server can cosume a message created via MSMQ? Any reading material, links will be helpful, working examples would be great.
From the MSMQ product group's blog:
JMS and MSMQ interoperability

Resources