activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kaustubh khasnis <kaustubh.khas...@gmail.com>
Subject Re: Is it possible to generate message-id before sending the JMS message?
Date Fri, 23 Sep 2011 13:19:22 GMT
Please correct me if I am wrong, but in same onSend method one could
override the messageId as well right?

We also planning to use same, are there any ill-effects of that?

Thanks and regards
Kaustubh

On Thu, Sep 22, 2011 at 11:49 PM, Martin C. <martinc@gmx.at> wrote:

> Hi,
>
> ok I see, but this is only possible if sending is done directly before
> committing the database transaction. It wouldn't work so well if
> sending was done "somewhere" during the process. I had hoped that I
> could feed something along a UUID as the message ID and it would be
> used then, but I can see how this would make certain things (like
> duplicate detection, ...) a lot harder.
>
> Thanks for your answer, anyways!
>
> Best regards,
> Martin
>
> On Thu, Sep 22, 2011 at 7:36 PM, Gary Tully <gary.tully@gmail.com> wrote:
> > you would need to pass use your own message impl that extends
> > ActiveMQMessage and override
> > org.apache.activemq.command.ActiveMQMessage#onSend
> >
> > on that callback, you will have the messageId and be able to commit
> > the db transaction. On return from that method the message will be
> > sent.
> > be sure and call super.onSend() though.
> >
> > On 22 September 2011 18:09, Martin C. <martinc@gmx.at> wrote:
> >> Hi,
> >>
> >> I'd like to know the message ID of a message I am going to send before
> >> actually sending it. Is this possible?
> >>
> >> Reason is that I want to delay sending the JMS messages until my
> >> database transaction has been comitted, but I already want to record
> >> the message IDs as correlation IDs in exactly this database
> >> transaction.
> >>
> >> Best regards,
> >> Martin
> >>
> >
> >
> >
> > --
> > http://fusesource.com
> > http://blog.garytully.com
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message