2

Closed

Partitioned Entity is not supported over AMQP with Service Bus

description

Hi,
I'm trying the following just to test library ...

I want to use one connection, one session but two link inside the single session to send to two different queues.
I want to execute this operation in a parallel manner on two separate threads.
I put the following code in a test method, inside LinkTests.cs.
Connection connection = new Connection(address);
Session s = new Session(connection);

Thread t1 = new Thread(new ParameterizedThreadStart(Thread_Send));
t1.Start(new object[] { s, "q1" });

Connection connection = new Connection(address);
Session s = new Session(connection);

Thread t1 = new Thread(new ParameterizedThreadStart(Thread_Send));
t1.Start(new object[] { s, "q1" });

Thread t2 = new Thread(new ParameterizedThreadStart(Thread_Send));
t2.Start(new object[] { s, "q2" });

t1.Join();
t2.Join();

s.Close();
connection.Close();Thread t2 = new Thread(new ParameterizedThreadStart(Thread_Send));
t2.Start(new object[] { s, "q2" });

t1.Join();
t2.Join();

s.Close();
connection.Close();
The thread is like the following :
public void Thread_Send(object state)
{
     object[] parameters = (object[])state;
     Session s = (Session)parameters[0];
     string queue = (string)parameters[1];

    SenderLink sender = new SenderLink(s, "send-link-" + queue, queue);
    for (int i = 0; i < 10; i++)
    {
                Message message = new Message();
                message.Properties = new Properties();
                message.Properties.MessageId = i.ToString();
                sender.Send(message, null, null);
    }

    Thread.Sleep(10000);

    sender.Close();
}
If I execute the above code with Qpid Proton broker it works fine but if I execute it with Service Bus, I receive a detach message with error :

Partitioned Entity is not supported over AMQP

Is it normal ? Can you explain me the problem ?
Why it is talking about partitioned entity ? I'm accessing to two queues using two different links inside same session and connection (I want to test multiplexing).

Attached the full logs with Qpid Proton broker and Service Bus.

Paolo

file attachments

Closed Sep 1, 2015 at 1:15 AM by xinchen

comments

xinchen wrote Jun 5, 2014 at 9:46 PM

This is expected. The queue with name "q2" is a partitioned entity. You can confirm this by checking the value of the EnablePartitioniing property of the queue description. Currently we do not support partitioned entity with AMQP.

Another limitation of the Service Bus service is supporting multiple links to different queues within a single session. The client may receive a detach from link-redirect error in that case.

We are working to add both support to the service and it will be available soon.

ppatierno wrote Jun 6, 2014 at 5:20 AM

I have two queues in the namespace for testing. q1 was created from VS2013 and q2 was created from online management portal. I think that management portal creates queues partitioned by default.

Regarding multiple links to different queues on the same session, the only solution I have is to use two different sessions each with its link.

Paolo.