ISenderLink semantics question ...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ISenderLink semantics question ...

psparago
I am brand new to AMQP 1.0 (have some AMQP 0.9 experience which honestly
doesn't help much).

I have a .NET Core application using the amqpnetlite client and a Go
application using vcabbage/amqp client. They both are running on the same
Linux VM with ActiveMQ 5.15.10 as the provider

I have run into an issue that I think may be related to the way I'm sending
a message over a "one shot" sender link from the .NET core application
(sender) to the Go application (receiver).

Things are generally working as expected until at some unknown point the
receiver begins receiving this error dozens (maybe hundreds) of times per
second and seems to continue "forever":

*Error{Condition: amqp:decode-error, Description: Could not decode AMQP
frame: hex: 0000017202000000005314d00000001300000004 ...

I've read this can happen if the sender closes the connection too quickly.

Here's my sender C# .NET core code (note that the session is long lived):

ISenderLink sender = null;
try
{
    ...
    sender = _session.CreateSender(routingKey, routingKey);
    sender.Send(m);
}
catch (Exception e)
{
    ...
}
finally
{
    if (sender != null)
    {
        sender.Close();
    }
}

Here's the receiver Go code:

// Create a receiver
v1bc.receiver, err = v1bc.session.NewReceiver(
        amqp.LinkSourceAddress(v1bc.rpcAddress),
        amqp.LinkCredit(1), // Is this correct???
)
if err != nil {
    ...
}
// Receive callback messages asynchronously here
go func() {
        for {
                // Receive next message
                msg, err := v1bc.receiver.Receive(context.Background())
                if err != nil {
                        ...
                        continue
                }

                // Accept message
                if err = msg.Accept(); err != nil {
                        ...
                        continue
                }

          v1bc.payloadChannel <- msg.Value.([]byte)

        }
}()




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html