Thanks pavel that helped.

On Mon, Dec 31, 2012 at 4:07 AM, Pavel Moravec <[email protected]> wrote:

> Hi Khan,
> no, one queue is enough. See my favourite example below:
>
> # create a LVQ named MyLVQ with values stored in header field
> "stock-symbol"
> qpid-config add queue MyLVQ --argument
> qpid.last_value_queue_key=stock-symbol
>
> # generate some messages with stock prices
> $ qpid-send -a "MyLVQ" --property 'stock-symbol'='RHT' --property
> 'stock-value'='50' -m 1
> $ qpid-send -a "MyLVQ" --property 'stock-symbol'='ORCL' --property
> 'stock-value'='50' -m 1
> $ qpid-send -a "MyLVQ" --property 'stock-symbol'='RHT' --property
> 'stock-value'='53' -m 1
> $ qpid-send -a "MyLVQ" --property 'stock-symbol'='MSFT' --property
> 'stock-value'='50' -m 1
> $ qpid-send -a "MyLVQ" --property 'stock-symbol'='RHT' --property
> 'stock-value'='52' -m 1
>
> # read the queue content - only the latest stock-symbol value will be
> printed
> $ qpid-receive -a "MyLVQ" --print-headers yes --print-content no -m 10
> Properties: {sn:1, stock-symbol:ORCL, stock-value:50,
> ts:1356948468924902877, x-amqp-0-10.routing-key:MyLVQ}
>
> Properties: {sn:1, stock-symbol:MSFT, stock-value:50,
> ts:1356948468994528314, x-amqp-0-10.routing-key:MyLVQ}
>
> Properties: {sn:1, stock-symbol:RHT, stock-value:52,
> ts:1356948469024261662, x-amqp-0-10.routing-key:MyLVQ}
>
> $
>
> Kind regards,
> Pavel
>
>
> ----- Original Message -----
> > From: "Rajesh Khan" <[email protected]>
> > To: [email protected]
> > Sent: Monday, December 31, 2012 11:43:55 AM
> > Subject: Last Value Queue - Information Required
> >
> > After reading about the LV queue. I wanted to implement the following
> > scenario. I have 3 symbols A,B and C and I want the queue to always
> > hold
> > the latest prices of these symbols.
> > My question is will I have to create a separate queue for each symbol
> > ? Any
> > suggestions would be appreciated.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to