activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: Reject queue message if no Consumer is available
Date Tue, 08 Oct 2013 21:56:54 GMT
Good point. I don't endorse it, but if there are use cases that require,
you can implement it w/ Advisory messages which would let you know whether
there is a consumer. Could also do w/ JMX mbean lookups, but advisory
messages would probably be best.


On Tue, Oct 8, 2013 at 2:08 PM, Paul Gale <paul.n.gale@gmail.com> wrote:

> Simone's requirements do seem similar to what's described in the
> section entitled: "Complete Example: Producer that only Produces when
> there is a Consumer" (speaking of which all the code examples are
> missing) here:
>
> http://activemq.apache.org/cms/handling-advisory-messages.html
>
> Not endorsing it, but it does sound very similar.
>
> Thanks,
> Paul
>
> On Tue, Oct 8, 2013 at 3:31 PM, Johan Edstrom <seijoed@gmail.com> wrote:
> > Like Christian stated it doesn't make a whole lot of sense.
> > You don't need a plugin to reject either, use exclusive consumers.
> >
> > On Oct 8, 2013, at 1:28 PM, Christian Posta <christian.posta@gmail.com>
> wrote:
> >
> >> Well, the whole point of queueing messages is to be able to
> asynchronously
> >> deliver messages so that consumers don't have to be aware of producers
> and
> >> vice versa. That is, if there are no consumers, the producers should
> still
> >> be able to work. Maybe you can describe the problem you're trying to
> solve
> >> a little better?
> >>
> >>
> >> On Tue, Oct 8, 2013 at 10:35 AM, Simone Giacomelli <info@simone.pro>
> wrote:
> >>
> >>> I'm using ActiveMq in a request/response configuration.
> >>>
> >>> I was wondering if it is possible to reject Producer message if no
> Consumer
> >>> is available.
> >>> I did search the forum, googled very much, but found nothing close to
> my
> >>> scenario.
> >>>
> >>> My implementation is about a RPC mechanism. So if the requestor
> (Producer)
> >>> does not have a response (from Consumer) it will hang until a timeout
> >>> happen.
> >>> I would like to remove the timeout and give a (semi) immediate
> exception to
> >>> the Producer.
> >>>
> >>> Is it possible through a Broker Filter?  Or by any other means?
> >>>
> >>> Please, tell me if I missed something useful from my explanation, I'll
> be
> >>> glad to add further information.
> >>>
> >>> I'm using ActiveMq 5.8
> >>> Non persistent queue
> >>> I'm using it with Debian Linux and Ms Windows
> >>> Jdk 1.7_21
> >>> In embedded mode.
> >>>
> >>> best regards
> >>> Simone Giacomelli
> >>>
> >>> PS I was successfully able to create a customized authentication
> plugin.
> >>> And another plugin to reject Consumer if Destination have already one
> >>> Consumer
> >>> I love ActiveMQ :)
> >>>
> >>
> >>
> >>
> >> --
> >> *Christian Posta*
> >> http://www.christianposta.com/blog
> >> twitter: @christianposta
> >
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

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