[ 
https://issues.apache.org/jira/browse/DISPATCH-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15210248#comment-15210248
 ] 

Ganesh Murthy commented on DISPATCH-241:
----------------------------------------

I did the following steps after getting the latest router code.

Added the following to qdrouterd.conf
{noformat}
fixedAddress {
    prefix: /spread/
    fanout: single
    bias: spread
}  
{noformat}

1. Start the router
2. Open two terminal windows and start 2 receivers using the following command
{noformat}
python simple_recv.py --address localhost//spread/ -m10
{noformat}
3. Start a third terminal window and start a sender like this 
{noformat}
python simple_send.py --address localhost//spread/ -m20
{noformat}
You will see that the messages are spread between the receivers 
One receiver window has all even numbers
{noformat}
[gmurthy@localhost python]$ python simple_recv.py --address localhost//spread/ 
-m20
{u'sequence': int32(2)}
{u'sequence': int32(4)}
{u'sequence': int32(6)}
{u'sequence': int32(8)}
{u'sequence': int32(10)}
{u'sequence': int32(12)}
{u'sequence': int32(14)}
{u'sequence': int32(16)}
{u'sequence': int32(18)}
{u'sequence': int32(20)}
{noformat}

and the other receiver window has all odd numbers
{noformat}
[gmurthy@new-host python]$ python simple_recv.py --address localhost//spread/ 
-m20
{u'sequence': int32(1)}
{u'sequence': int32(3)}
{u'sequence': int32(5)}
{u'sequence': int32(7)}
{u'sequence': int32(9)}
{u'sequence': int32(11)}
{u'sequence': int32(13)}
{u'sequence': int32(15)}
{u'sequence': int32(17)}
{u'sequence': int32(19)}
{noformat}

Paolo, can you please confirm you are seeing the same thing I am seeing. Thanks.

> Bias "spread" config with leading "/" on address has a "multicast" behavior
> ---------------------------------------------------------------------------
>
>                 Key: DISPATCH-241
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-241
>             Project: Qpid Dispatch
>          Issue Type: Bug
>    Affects Versions: 0.5
>            Reporter: Paolo Patierno
>            Assignee: Ganesh Murthy
>             Fix For: 0.6
>
>
> I have following config :
> fixedAddress {
>     prefix: /spread/
>     fanout: single
>     bias: spread
> }
> - fanout: single means that only one consumer will receive a message 
> published on /spread/ address (in a competing consumers fashion)
> - bias: spread means that the router sends message to only one consumer but 
> as documentation says "in an approximately even manner". It sounds to me that 
> the router tracks the consumers which receive message on that address and for 
> a new message tries to send it to another consumer.
> The problem is following :
> if more consumers attach to "spread/" all works fine (only one of them 
> receives message) but if they attach to "/spread/" (with leading "/") then 
> all consumers receive the message like a "multicast" configuration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to