Wildfly redeliver JMS Messages - jboss

im using jms in jboss Wildfly 8 for messaging. Message delivered succesfully and Receiver goes on with processing. And it takes about 15-20 Minutes, till Receiver does its job. But Server redelivers same Message after about 10 minutes. My Question is how and where can i configure Wildfly to wait for it with for example 20 Mins timelimitations. i found some helpful explenations on Wildfly documentation. But im not sure whether its right way to do this.
Jboss Documentation
Messaging Configuration
should i just add
<redelivery-delay>1200000</redelivery-delay>
 <max-delivery-attempts>2</max-delivery-attempts>
in <address-setting> in standalone-full.xml

The setting you made is correct. The setting makes the server attempt to deliver messages for another 2 attempts if the first delivery is unsuccessful.
The fact that you be getting the same message several times should be related to the way you're telling the server that the message was processed.
Look at the link below and check that the acknowledge mode is correct with the operating mode of the class that receives the JMS messages.
JMS Message Delivery Reliability and Acknowledgement Patterns

Related

Delay in getting message from Microsoft Message Queue

There is a delay of 8 to 9 minutes in receiving the message in user's machine from a server's MSMQ. There is no blocks in network connectivity. How to find the root cause of the issue. Can any one help.
It is happening in many machines.Initially, there is no delay in receiving the messages from MSMQ.
Updates:
There are two servers - server 1 and server 2. Message sending from server 1 is getting delayed. There is no delay if the message is sent from server 2. What we need to check from server end? Can any one help.
Thanks in advance.
The delay in receiving the message from server to user machine via MSMQ is resolved.
Added registry keys DeferFirstConnectAttempt and WaitTime. These two keys resolved the latency issue.

hornetq fails when we change system time

I have an issue and I hope you can help me a bit.
I have to implement fast forwarding time, because I need to test something. I've wrote a python script which increment the system time with 5 seconds for every 1 real second. (5 times faster).
Then my jboss fails with some hornetq timeouts.
Do you have any ideas how I can fix this?
03/09/18 09:18:00,107 WARN
[org.hornetq.core.protocol.core.impl.RemotingConnectionImpl] (hornetq-
failure-check-thread) Connection failure has been detected: Did not
receive data from invm:0. It is likely the client has exited or crashed
without closing its connection, or the network between the server and
client has failed. You also might have configured connection-ttl and
client-failure-check-period incorrectly. Please check user manual for
more information. The connection will now be closed. [code=3]
The underlying issue is that changing the time breaks the connection-failure-detection algorithm used by the broker. The broker thinks it isn't receiving "ping" packets from clients at the proper time because you're forcing time to pass at 5x the normal rate. There is no way to fix this for remote clients aside from disabling or extending the connection TTL. However, for in-vm connections you could apply the fix from https://issues.jboss.org/browse/HORNETQ-1314 (which is not resolved in the version of HornetQ you are using) to the branch of HornetQ you're currently using and rebuild. If you don't want to rebuild you could upgrade to a version of JBoss AS (or Wildfly) which contains this fix.

Behavior of syslog handler in Wildfly 8

I want to use the syslog handler in Wildfly 8 to send the application logs to logstash (and I know this may not be best practice at the moment).
Does anyone know how the syslog handler acts if the syslog/logstash server is not available?
Is there any buffering (memory, files), does it consume endless resources in a reconnect loop, in short: Does anyone have experience with the syslog handler?
Thanks,
Michael
The syslog-handler will not buffer messages if the socket can't connect. If you use UDP then it will attempt to connect each time. Using TCP it depends on the version of the logmanager. I think with the version in WildFly 8 it will attempt to reconnect, but you'll lose any messages sent while the syslog server is down.

TIbco EMS Client Fault Tolerance

I am aware that the Tibco EMS provides Fault Tolerance in a hot backup configuration on the server side as detailed in the User's Guide, this answer and here.
But on the client side does Tibco EMS provide out of the box solution for fault-tolerant clients?
An example: on the topic Sports.F1.PitStop two clients (server1, server2) register as publishers. The idea being that should something go wrong on server1 (i.e. publisher on server1 goes down), server2 would seamlessly continue to publish on the topic. So the question is, does Tibco EMS provide such client-side fault-tolerance capability?
No.
EMS (or JMS) does not support a client-side fault tolerance feature. The reason is simple : typically, publishers processes don't know each other.
To elaborate:
Topics usually accepts many publishers (more than two).
In a pub/sub scenario, publishers don't know subscribers, and to an extent they don't typically know the other publishers.
Your solution:
My first question regarding your solution: Why can't both servers publish messages at the same time ?
I assume you have a good reason (like messages from server1 and server2 being redundant). In that case, then you will have to have some kind of communication between your "active" and "passive" server.
Possibility 1 : Server2 is connected to a simple service/rmi/other heartbeat mechanism, and can tell if/when Server1 as stopped publishing.
Possibility 2 : Server2 is itself subscribed to the topic, and can tell when messages have stopped.
Last note:
In case you meant shared "subscriptions" (as in, one durable subscription being shared between two servers): the new JMS 2.0 API is supporting this feature. EMS 8 is the only version of EMS supporting JMS 2.0.
I'm not sure if I fully understand your question. EMS is a message broker. It brokers messages. Thats all it does. If you have multiple servers publishing to the same topic, then that is fine for EMS. If your publishers themselves are in a fail-over configuration, so that only one is actively sending and the other takes over when the first one fails, then EMS doesn't care.
Managing the fail-over mechanism from one publisher to the other, that is something you have to develop yourself. EMS doesn't offer anything to support that. You need some kind of mechanism for server2 to know when server1 is down. There are several ways you can do that:
Use a heartbeat mechanism where the active server sends periodical heartbeat messages (possibly across EMS as well) and the passive server listens to them and when they stop, assume server1 is down.
Use an active open connection between server1 and server2 (open a simple tcp port for example and stop it from closing automatically by periodically sending a dummy message), and have an open read on that port. You'll get a connection error the moment server1 goes down and you don't have to wait for timeouts on heartbeats.
Use a third party monitoring tool, such as openview, tivoli or nagios to detect server1 is down and inform server2.
There is a feature on EMS you can use. EMS has system admin topics that you can subscribe to and that log basically anything that goes on internally. You can subscribe to connect and disconnect events to monitor any component connecting to or disconnecting from EMS. If server1 fails, this will be visible as a disconnect event.
heartbeat mecanism:
https://support.tibco.com/s/article/Tibco-KnowledgeArticle-Article-33918
For example:
client_heartbeat_server=10
client_timeout_server_connection=35
server_heartbeat_client=10
server_timeout_client_connection=35

What Happens To MSMQ When Network Connection Lost

If I am using MSMQ over the web, what happens if the network connection is lost between client and server?
So can you still add messages to the Queue, and if so where are they stored? In the client app, or in the clients OS etc?
For instance if I have a windows service which is adding items to a queue in a different country. What if the network connection is lost, and the windows service is restarted. Do the messages get lost forever?
The other part of the question relates to the route that a message takes, is it sent directly to the receiving queue, or is it written into a queue on the client side? Does that require MSMQ to be installed on the sending server, and how about licensing for that?
Is there any good documentation to explain the required setup?
Update: Regarding your follow up question. Yes you have to install msmq on the sending server. There aren't any licensing cost, because MSMQ is part of windows and not a separate software (just like the IIS). Here is documentation on "Setting Up a Message Queue" on windwos 2003.
Before Update: Outgoing message are stored in the outgoing queue of the sending server. They are not lost if the sending service is restarted. They will wait in the outgoing queues ( which can be inspected with the msmq manager ) for I don't know how long.
if the msmq service or the sending server are restarted. Then "express" messages will be lost. express or recoverable are properties of non-transcriptional messages.