You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Tim Chen <ti...@evri.com> on 2010/08/25 22:45:32 UTC

Queue message overwriting

Hi all,

I have a question on qpid 0.6 java broker.

I want to limit my queue to only store messages in memory, when memory is full for that queue it will just simply replace the oldest messages in the non-persistent queue.

I wonder how can this be done using JMS queue creation?

Thanks,

Tim

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: Queue message overwriting

Posted by William Henry <wh...@redhat.com>.
Hi Tim, 

The broker is language independent from a client perspective. All it knows about from clients is the messages it receives which could be from a client written in any language as long as it builds the messages correctly.  So you can have JMS clients sending messages through a C++ broker to Java and Python clients. 

The JMS client is basically a library that talks to the AMQP layer which in turn marshals the message on and off the wire transport. 

With regard to your attempt to connect to the C++ based broker: have you checked the correct host and port addresses? What port are you bringing up the broker? the default 5672? Have you security turned on? have you tried running the broker with "--auth no".

William


----- "Tim Chen" <ti...@evri.com> wrote:

> Also, I wonder if the C++ broker supports JMS interface?
> 
> I tried the same JMS code to connect to the Java broker with the C++
> broker and it's giving me connection refuesd JMS Exceptions.
> 
> Thanks,
> 
> Tim
> 
> 
> ----- Original Message -----
> From: "Tim Chen" <ti...@evri.com>
> To: dev@qpid.apache.org, cctrieloff@redhat.com
> Cc: david@evri.com
> Sent: Thursday, August 26, 2010 10:30:13 AM GMT -08:00 US/Canada
> Pacific
> Subject: Re: Queue message overwriting
> 
> From looking at the documentation, it does seems that the option to
> set queue policy (ring, flow-to-disk, etc) is only avaiable for C++
> broker.
> 
> Wonder if there are ways to make it work in the Java broker?
> 
> Tim
> 
> ----- Original Message -----
> From: "Carl Trieloff" <cc...@redhat.com>
> To: dev@qpid.apache.org
> Sent: Thursday, August 26, 2010 7:47:13 AM GMT -08:00 US/Canada
> Pacific
> Subject: Re: Queue message overwriting
> 
> 
> 
> Those are the semantics of the ring queue in the C++ broker, I don't 
> believe Java broker supports that yet,
> but please correct me if I'm wrong
> 
> Carl.
> 
> 
> On 08/25/2010 04:45 PM, Tim Chen wrote:
> > Hi all,
> >
> > I have a question on qpid 0.6 java broker.
> >
> > I want to limit my queue to only store messages in memory, when
> memory is full for that queue it will just simply replace the oldest
> messages in the non-persistent queue.
> >
> > I wonder how can this be done using JMS queue creation?
> >
> > Thanks,
> >
> > Tim
> >
> >
> ---------------------------------------------------------------------
> > Apache Qpid - AMQP Messaging Implementation
> > Project:      http://qpid.apache.org
> > Use/Interact: mailto:dev-subscribe@qpid.apache.org
> >
> >    
> 
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
> 
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
> 
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: Queue message overwriting

Posted by Tim Chen <ti...@evri.com>.
Also, I wonder if the C++ broker supports JMS interface?

I tried the same JMS code to connect to the Java broker with the C++ broker and it's giving me connection refuesd JMS Exceptions.

Thanks,

Tim


----- Original Message -----
From: "Tim Chen" <ti...@evri.com>
To: dev@qpid.apache.org, cctrieloff@redhat.com
Cc: david@evri.com
Sent: Thursday, August 26, 2010 10:30:13 AM GMT -08:00 US/Canada Pacific
Subject: Re: Queue message overwriting

>From looking at the documentation, it does seems that the option to set queue policy (ring, flow-to-disk, etc) is only avaiable for C++ broker.

Wonder if there are ways to make it work in the Java broker?

Tim

----- Original Message -----
From: "Carl Trieloff" <cc...@redhat.com>
To: dev@qpid.apache.org
Sent: Thursday, August 26, 2010 7:47:13 AM GMT -08:00 US/Canada Pacific
Subject: Re: Queue message overwriting



Those are the semantics of the ring queue in the C++ broker, I don't 
believe Java broker supports that yet,
but please correct me if I'm wrong

Carl.


On 08/25/2010 04:45 PM, Tim Chen wrote:
> Hi all,
>
> I have a question on qpid 0.6 java broker.
>
> I want to limit my queue to only store messages in memory, when memory is full for that queue it will just simply replace the oldest messages in the non-persistent queue.
>
> I wonder how can this be done using JMS queue creation?
>
> Thanks,
>
> Tim
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>    


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: Queue message overwriting

Posted by Tim Chen <ti...@evri.com>.
>From looking at the documentation, it does seems that the option to set queue policy (ring, flow-to-disk, etc) is only avaiable for C++ broker.

Wonder if there are ways to make it work in the Java broker?

Tim

----- Original Message -----
From: "Carl Trieloff" <cc...@redhat.com>
To: dev@qpid.apache.org
Sent: Thursday, August 26, 2010 7:47:13 AM GMT -08:00 US/Canada Pacific
Subject: Re: Queue message overwriting



Those are the semantics of the ring queue in the C++ broker, I don't 
believe Java broker supports that yet,
but please correct me if I'm wrong

Carl.


On 08/25/2010 04:45 PM, Tim Chen wrote:
> Hi all,
>
> I have a question on qpid 0.6 java broker.
>
> I want to limit my queue to only store messages in memory, when memory is full for that queue it will just simply replace the oldest messages in the non-persistent queue.
>
> I wonder how can this be done using JMS queue creation?
>
> Thanks,
>
> Tim
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>    


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: Queue message overwriting

Posted by Carl Trieloff <cc...@redhat.com>.

Those are the semantics of the ring queue in the C++ broker, I don't 
believe Java broker supports that yet,
but please correct me if I'm wrong

Carl.


On 08/25/2010 04:45 PM, Tim Chen wrote:
> Hi all,
>
> I have a question on qpid 0.6 java broker.
>
> I want to limit my queue to only store messages in memory, when memory is full for that queue it will just simply replace the oldest messages in the non-persistent queue.
>
> I wonder how can this be done using JMS queue creation?
>
> Thanks,
>
> Tim
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>    


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: Queue message overwriting

Posted by Tim Chen <ti...@evri.com>.
Hi Marnie,

Thanks for the info.

I've decided to start using the C++ broker paired with qpid JMS client.

I wonder if you know if it's possible to create a queue using the qpid Java JMS client in the C++ broker?

I used to be able to with the Java broker, but the same code that calles session.createQueue simply returns null and a error message will show up in qpid that a invalid queue name was put in.

Thanks!

Tim


----- Original Message -----
From: "Marnie McCormack" <ma...@googlemail.com>
To: dev@qpid.apache.org
Sent: Thursday, August 26, 2010 1:01:08 PM GMT -08:00 US/Canada Pacific
Subject: Re: Queue message overwriting

Hi Tim,

On the Java Broker there are a few options for constraining a queue's growth
(Producer Side Flow Control), and using only in memory storage
(MemoryMessageStore) as well as LVQ where older messages are overwritten by
new messages with the same header value.
However, these don't as yet come together such that you can trigger
overwriting on a memory threshold.

There are docs for these features, jic, here:

https://cwiki.apache.org/qpid/use-last-value-queues-lvq.html
https://cwiki.apache.org/qpid/producer-flow-control.html
https://cwiki.apache.org/qpid/3rd-party-libraries.html

Regards,
Marnie
On Wed, Aug 25, 2010 at 9:45 PM, Tim Chen <ti...@evri.com> wrote:

> Hi all,
>
> I have a question on qpid 0.6 java broker.
>
> I want to limit my queue to only store messages in memory, when memory is
> full for that queue it will just simply replace the oldest messages in the
> non-persistent queue.
>
> I wonder how can this be done using JMS queue creation?
>
> Thanks,
>
> Tim
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: Queue message overwriting

Posted by Marnie McCormack <ma...@googlemail.com>.
Hi Tim,

On the Java Broker there are a few options for constraining a queue's growth
(Producer Side Flow Control), and using only in memory storage
(MemoryMessageStore) as well as LVQ where older messages are overwritten by
new messages with the same header value.
However, these don't as yet come together such that you can trigger
overwriting on a memory threshold.

There are docs for these features, jic, here:

https://cwiki.apache.org/qpid/use-last-value-queues-lvq.html
https://cwiki.apache.org/qpid/producer-flow-control.html
https://cwiki.apache.org/qpid/3rd-party-libraries.html

Regards,
Marnie
On Wed, Aug 25, 2010 at 9:45 PM, Tim Chen <ti...@evri.com> wrote:

> Hi all,
>
> I have a question on qpid 0.6 java broker.
>
> I want to limit my queue to only store messages in memory, when memory is
> full for that queue it will just simply replace the oldest messages in the
> non-persistent queue.
>
> I wonder how can this be done using JMS queue creation?
>
> Thanks,
>
> Tim
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>