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???
About Question enthuware.oce-ejbd.v6.2.418 :
Moderators: Site Manager, fjwalraven
-
- Posts: 1
- Joined: Thu Apr 25, 2013 4:56 am
- Contact:
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.418 :
I see that the third option is incorrect.
-Paul.
-Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 38
- Joined: Fri Aug 16, 2013 11:37 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.418 :
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.
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.
-
- Posts: 11
- Joined: Sun Apr 07, 2013 10:10 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.418 :
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.
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.
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.418 :
Updated. Thank you for your feedback!
Paul.
Paul.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 71 guests