Page 1 of 1
About Question enthuware.oce-ejbd.v6.2.418 :
Posted: Tue May 07, 2013 9:06 am
by johnbesel
hello together,
I can not understand why this answer should be correct.
The third answer is correct im test:
The message will not be missed even if the consumer is down for some time and comes back up later.
but in this code snippet I dont see anything, that say me that the queue is configured with durable subscription.
why is the third answer correct??
and why is the first answer not correct???
Re: About Question enthuware.oce-ejbd.v6.2.418 :
Posted: Sat May 11, 2013 2:47 pm
by admin
I see that the third option is incorrect.
-Paul.
Re: About Question enthuware.oce-ejbd.v6.2.418 :
Posted: Fri Aug 30, 2013 9:08 am
by sanju.ait@gmail.com
We can't predict the behavior because of lack of info about consumer.
1) Message may be never received by consumer.
Reason : Consumer is down for now and message will expire in 30000 milliseconds.
2) Message may be re delivered many times.
Reason : Consumer MDB is in CMT and transaction is getting rolled back every time because of some persistent issue.
3) Message may be re delivered many times.
Reason : Consumer MDB is in BMT and throwing system exception every time because of some persistent issue.
4) Message may be re delivered many times.
Reason : Consumer may not be a MDB and consumer code is using CLIENT_ACKNOWLEDGE, but not able to acknowledge because of some persistent issue.
So we need to know the status of consumer to predict the behavior of message life.
Re: About Question enthuware.oce-ejbd.v6.2.418 :
Posted: Thu Sep 12, 2013 11:40 am
by ArsenyKo
My 2 cents,
I think the answer options are not correct. At this moment, the right answer sounds
- The message will be received by the MDB listening on the destination queue once and only once.
I'd like to highlight that we have mp.send(message, DeliveryMode.NON_PERSISTENT, 1, 30000); in the question.
And (I answered)
- The message will be received by the MDB listening on the destination queue once and only once if the DeliveryMode.PERSISTENT is used.
If we take a look at JMS 1.1 spec 4.7 Message Delivery Mode it says
A JMS provider must deliver a NON_PERSISTENT message at-most-once. This
means that it may lose the message, but it must not deliver it twice.
A JMS provider must deliver a PERSISTENT message once-and-only-once. This
means a JMS provider failure must not cause it to be lost, and it must not
deliver it twice.
And logically, the behaviour once and only once may fail if JMS provider crashes... it's only possible to achieve with PERSISTENT mode.
So I think you can change the first answer option to
- The message will be received by the MDB listening on the destination queue at most once.
Otherwise option 2 is correct.
Re: About Question enthuware.oce-ejbd.v6.2.418 :
Posted: Sat Sep 14, 2013 8:56 am
by admin
Updated. Thank you for your feedback!
Paul.