JMS remote topic question

Latest response

I have a standalone server that produces and consumes JMS messages on a topic and a remote server that also consumes messages on the topic. Everything is working fine, but on my standalone application I have the outbound socket binding set to 5445 the remote server is listening on port 5645(5445 +200 port offset of the application). I verified nothing is listening on port 5445 using netstat -l | grep 5445. Ports 5645 and 6245 are listening. The outbound socket binding on the remote server is set to 6245 which is the port that the standalone server is listening to(5445+800 port offset). If I specified 5645 in the standalone server configuration file, my perception is that things don't work. So I am puzzled, is there really only one connection working here the one on 6245 or does the connection bound to jms-server-1 somehow know to apply the 200 offset for the other server?

server producing and consuming
Standalone-full-ha.xml ...

remote-
domain.xml ...

Thanks

Attachments

Responses

I must admit that I'm not sure if I understand full your setup. But I presume that your domain.xml hosts a cluster with JMS destinations and your are consuming and producing messages on your standalone-full-ha instance using the RA and your RA is configured to consume from a remote broker. I assume that your domain and standalone-full-ha are running on different machines. Normally you would have to specify the ports of the remote broker on your RA configuration there is no way that the standalone-full-ha can know about the port range of your domain unless there is a misconfiguration and some how all instance share the same discovery/broadcast address. Can you share your configuration files?

So right now I have a single node in the domain cluster as I was trying to isolate a JMS issue. I will attach the configuration files.

I'm sorry but I don't think your current config works. Could you tell me what is your final intention. Your standalone*.xml has a remote RA with two connectors one inVM and one remote, I suspect it actually never connects to the remote broker. It should have only remote connection. Your domain.xml defines a cluster using static connectors where server-2-connector is not defined anywhere.

org.hornetq.core.remoting.impl.netty.NettyConnectorFactory The above way of configuring has been deprecated. You should use socket-bindings instead. I don't believe you have a cluster.

If you want o configure a remote RA here's an example:

true java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory;java.naming.provider.url=remote://${let01.host}:${let01.jndi.port},${let02.host}:${let02.jndi.port};java.naming.security.principal=${user.name};java.naming.security.credentials=${user.password} -1 10000 ${user.name} ${user.password} 50 50

Tom

Tom,

I am sorry for the confusion I am causing you. I know there is no cluster. I removed the cluster configuration to simplify things to address another issue I am having. So normally, I would have a second server defined in the domain.xml that forms a two node cluster. I removed that second server on purpose to reproduce a JMS issue I am having with grouping. I have a standalone application that receives CDR events from a call bridge. It saves these records to disk, and distributes them both on a JMS topic and an http interface. I have a second application that is part of a cluster normally although right now has you point out has only a single node. This receives the events on the JMS topic and processes them. So the singleton application is not intended to be part of the cluster. The reason there is both a InVm and remote connection is because the singleton application consumes messages from the topic in addition to the processing application which also consumes messages on the Topic.
I was not aware that the configuration was deprecated. I was directed by a RedHat resource to the following links to configure this serveral months ago. https://access.redhat.com/solutions/260683 and https://access.redhat.com/solutions/197293.

Ultimately, I would like to have my two applications running at the same time. Were the topic is the only JMS communication that they share. So from the perspective of the singleton application, the processing application is a remote application listening to the topic.

Thanks, Jim

If your application is running on hte standalone-*.xml instance then all you need is the remote RA that points at the remote broker. In your RA configuration you your have at least one that points to the broker. In your specific case since you don't have cluster you need just one.

I'm note sure where your second application will be running? On the standalone or the domain (cluster).

Tom

The second application will run in the domain(cluster). The first application is running as a standalone application. I ultimately will have two instances of the standalone application on separate servers. I provide a unique id for each message so duplicates are removed by the topic. The master node in my cluster will process the events, and be distributed in the cluster on the JMS queues you see in the configuration files.

So back to my original question. Given that the first application is receiving messages on the topic and the second applications is also receiving messages on the topic. Is the first application sending messages on the connection associated with the 6245 port and the configuration that has 5445 is not needed at all? Or is that connection somehow working via different mechanism?

I would find it very difficult to believe that your current set up works. But I would have to see the log files first. Lets say your domain.xml hosts a topic called appTopic. That topic is exposed on host:port (my host:5445). You standalone.xml would have to configure a remote RA that would have a connector with my host:5445. This way an application ruling on domain.xml could subscribe on appTopic and application running on standalone.xml could subscribe on appTopic hosted by domain.xml. Hope that helps - Tom

Tom, I did the following experiment I removed completely the standalone outbound binding jms-server-1. And things are working as I desire. I am only trying to send messages on the topic from the standalone application to the domain application. I am not trying to send messages from the domain application to the standalone application. So the connection that domain application receives the topic messages on is the connection associated with port 6245. This makes sense as it is the 5445+800 offset. My mistake was thinking that I had to create 2 connections for this to work in one direction. So the domain application initiates the connection on the port that the standalone application is listening to and this is the only connection that is needed for things to work in the one direction. Hopefully, this is what you were trying to tell me, but I didn't understand before.

Thanks, Jim

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.