qpid-proton mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Meulemans (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PROTON-528) Incorrect limit for the channel number.
Date Wed, 05 Mar 2014 20:00:45 GMT

     [ https://issues.apache.org/jira/browse/PROTON-528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marcel Meulemans updated PROTON-528:
------------------------------------

    Attachment: proton.patch

This patch fixes the issue.

> Incorrect limit for the channel number.
> ---------------------------------------
>
>                 Key: PROTON-528
>                 URL: https://issues.apache.org/jira/browse/PROTON-528
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-j
>    Affects Versions: 0.7
>            Reporter: Marcel Meulemans
>            Priority: Minor
>         Attachments: proton.patch
>
>
> AMQP 1.0 specifies 2 bytes for the channel number but the java implementation only uses
the lower byte (proton-c uses both). The following code shows the issues when used together
with the c recv example. The loop will hang after sending 256 messages.
> import java.io.IOException;
> import org.apache.qpid.proton.messenger.Messenger;
> import org.apache.qpid.proton.messenger.impl.MessengerImpl;
> import org.apache.qpid.proton.message.Message;
> import org.apache.qpid.proton.message.impl.MessageImpl;
> import org.apache.qpid.proton.amqp.messaging.AmqpValue;
> public class ProtonTest
> {
> 	public static void main(String[] args)
> 	{
> 		Messenger messenger = new MessengerImpl();
> 		try
> 		{
> 			messenger.start();
> 			for (int i = 0; i < 257; i++)
> 			{
> 			    Message message = new MessageImpl();
> 			    message.setAddress(String.format("amqp://localhost:5672/queue://receiver%03d",
i));
> 			    message.setBody(new AmqpValue("message " + i));                   
> 			    messenger.put(message);
> 			    messenger.send();
> 			    System.out.println("Send message " + i);
> 			}        
> 			messenger.stop();
> 		}
> 		catch (IOException e)
> 		{
> 			e.printStackTrace();
> 		}
> 	}
> }



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message