Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected backout behaviour with DMLC and Websphere MQ #79

Closed
apinske opened this issue Feb 9, 2022 · 2 comments
Closed

unexpected backout behaviour with DMLC and Websphere MQ #79

apinske opened this issue Feb 9, 2022 · 2 comments

Comments

@apinske
Copy link

apinske commented Feb 9, 2022

I already reported this to Spring: spring-projects/spring-framework#27987
But might be interesting to document here as well.

Websphere MQ has a strange way of backout handling (i.e. moving poison messages). It does not move poison messages to the backout queue immediately on the "final" rollback, but only increments the internal BackoutCount (to be one more than it should be able to be) and leaves the message on the initial queue. The actual move is performed in a subsequent (unrelated!) receive-call. This is documented here.

DMLC uses a polling approach and thus is susceptible to the described behaviour. It is not really possible to observe this behaviour, as any attempt to "see" the messages moves it to the right queue. Only way is to "not observe" the message already being in the backout queue.

The practical implications are two-fold:

  • A single poison message is not immediately visible on the appropriate backout queue for handling. Is is only moved when a next receive-pass commits (takes in the worst case the amount of receive-timout + handling of an unrelated msg).
  • In a scenario where temporarily all/many messages are poison the move-to-backout-operations may also rollback.
@ibmmqmet
Copy link
Collaborator

I'm not really clear what you think the problem is. But in any case, any application that uses the MQ JMS classes in either a synchronous or asynchronous (usually something like a JEE MDB) fashion will be building on the documented behaviour. If you want to suggest a change to MQ's JMS code, then you can always raise an idea here. But there's nothing that can be done at this layer to change it.

@apinske
Copy link
Author

apinske commented Feb 10, 2022

My thoughts were:

  • Spring/DMLC with MQ may lead to unexpected behaviour.
  • This lib encourages the use of SpringBoot+DMLC with MQ.
  • Therefore it should at least document this behaviour for its users. And in the best case provide ways to mitigate the issues.

I don't think most users of this lib (or boot for that matter) even recognise that the docs about "receives messages synchronously" apply to them, i.e. that spring uses a polling approach for message listeners.

I also voted/commented on https://integration-development.ideas.ibm.com/ideas/MESNS-I-190.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants