JuliaComputing / AMQPClient.jl

A Julia AMQP (Advanced Message Queuing Protocol) / RabbitMQ Client.
Other
39 stars 21 forks source link

MessageConsumer has no field state #55

Closed DatName closed 2 years ago

DatName commented 2 years ago

Hello. I am getting the following error when closing connection:

type MessageConsumer has no field state
    Stacktrace:
     [1] getproperty
       @ ./Base.jl:42 [inlined]
     [2] connection_processor(c::AMQPClient.MessageConsumer, name::String, fn::typeof(AMQPClient.channel_message_consumer))
       @ AMQPClient ~/.julia/packages/AMQPClient/XjtQ2/src/protocol.jl:357
     [3] (::AMQPClient.var"#24#26"{String, AMQPClient.MessageConsumer})()
       @ AMQPClient ./task.jl:423

The problem is not this code in particular, but the fact that close(c) is not being called in this case (https://github.com/JuliaComputing/AMQPClient.jl/blob/master/src/protocol.jl#L361).

nsslh commented 2 years ago

This issue is obscuring an underlying error. Whatever the cause of the original error, we can't see it because this code isn't right. MessageConsumer really does not have a state field: check here.

nsslh commented 2 years ago

Bug introduced in d057d0b. It's not clear to me what the intent was. MessageConsumer did not have a state field at that time either.