[rabbitmq-discuss] Trying to do a simple subscription returns message too long error... (RabbitMq.Net)
Patrick Kenney
pekenney at gmail.com
Thu Jul 23 20:46:05 BST 2009
I am referencing the downloaded 1.5.3 RabbitMQ.Client and
RabbitMQ.ServiceModel...
<CodeSnip>
//subscribe call in winform button click event...
using (System.ServiceModel.ChannelFactory<IDispatcherService> scf =
GetDispatcherCF())
{
IDispatcherService client = scf.CreateChannel();
client.Subscribe(new SubscriberInfo("amqp:///subscriber", "c1", "c2"));
}
//IDispatcherService Interface...
using Test.Entity;
using System;
using System.ServiceModel;
namespace Test.Base
{
[ServiceContract]
public interface IDispatcherService
{
[OperationContract(IsOneWay = true)]
void Publish(Message message);
[OperationContract(IsOneWay = true)]
void Subscribe(SubscriberInfo subscriber);
[OperationContract(IsOneWay = true)]
void Unsubscribe(SubscriberInfo subscriber, bool removeAllContexts);
}
}
//GetDispatcherCF() called by winform button click event above...
private ChannelFactory<IDispatcherService> GetDispatcherCF()
{
ChannelFactory<IDispatcherService> scf;
*//the error I posted previously and below occurs here during the
RabbitMQBinding instantiation... *
scf = new ChannelFactory<IDispatcherService>(
new RabbitMQBinding(
new Uri("amqp://localhost:5672/"),
Protocols.AMQP_0_8),
new EndpointAddress("amqp:///dispatcher"));
return scf;
}
</CodeSnip>
<ErrorSnip>
the following is returned...
The AMQP operation was interrupted: AMQP close-reason, initiated by Library,
code=311, text="The body of a message (18446744073709551575 bytes) was too
long.", classId=0, methodId=0, cause=RabbitMQ.Client.Impl.BodyTooLongException:
The body of a message (18446744073709551575 bytes) was too long.
at RabbitMQ.Client.Impl.ContentHeaderBase.ReadFrom(Int32 channelNumber,
NetworkBinaryReader reader) in
C:\RabbitMQ.Client\RabbitMQ\Client\Impl\ContentHeaderBase.cs:line 23
at RabbitMQ.Client.Impl.CommandAssembler.HandleFrame(Frame f) in
C:\RabbitMQ.Client\RabbitMQ\Client\Impl\CommandAssembler.cs:line 53
at RabbitMQ.Client.Impl.Session.HandleFrame(Frame frame) in
C:\RabbitMQ.Client\RabbitMQ\Client\Impl\Session.cs:line 16
at RabbitMQ.Client.Impl.ConnectionBase.MainLoopIteration() in
C:\RabbitMQ.Client\RabbitMQ\Client\Impl\ConnectionBase.cs:line 434
at RabbitMQ.Client.Impl.ConnectionBase.MainLoop() in
C:\RabbitMQ.Client\RabbitMQ\Client\Impl\ConnectionBase.cs:line 388
</ErrorSnip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090723/427b5894/attachment.htm
More information about the rabbitmq-discuss
mailing list