AMQP Client: Consumer is not consuming messages #13422
-
Describe the bugSetup:
Unexpected behaviorAfter some time, we have found out that the queue was holding a number of messages (~50k), but none of them was delivered to the custom consumer and neither to the iex()50> Process.info(channel_pid)
[
current_function: {:gen_server, :loop, 7},
initial_call: {:proc_lib, :init_p, 5},
status: :waiting,
message_queue_len: 0,
links: [#PID<0.4265.0>],
dictionary: [
"$initial_call": {:amqp_channel, :init, 1},
"$ancestors": [#PID<0.4265.0>, #PID<0.2201.0>, #PID<0.2076.0>,
#PID<0.2073.0>, :amqp_sup, #PID<0.1812.0>],
process_name: {:amqp_channel,
{"client 10.40.3.3:38161 -> 10.40.3.12:5672", 67}},
gen_server_call_timeout: 60000
],
trap_exit: false,
error_handler: :error_handler,
priority: :normal,
group_leader: #PID<0.1811.0>,
total_heap_size: 12556,
heap_size: 1598,
stack_size: 12,
reductions: 176109385,
garbage_collection: [
max_heap_size: %{error_logger: true, kill: true, size: 0},
min_bin_vheap_size: 46422,
min_heap_size: 233,
fullsweep_after: 65535,
minor_gcs: 96
],
suspending: []
] Note also that the number of reductions did not change between calls to Once the service was restarted (so that both channel and consumer processes were killed), the messages were correctly consumed from the queue. Reproduction stepsUnfortunately, this happens randomly (once in a month at most) and I have no idea how to reproduce it. Expected behaviorThe consumer should always consume messages from the queue it is registered to. Additional contextIt would be great to even have just some pointers to the code that might cause the issue, or some references on what to look for if/when this happens again (maybe some matchspecs to feed to |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
RabbitMQ 3.8 has been out of support for a few years at this point. Please open an issue if you see the problem with RabbitMQ 4.0. |
Beta Was this translation helpful? Give feedback.
-
I think I mixed up the names of the modules and you are using AMQP 0.9.1. Either way, please upgrade. |
Beta Was this translation helpful? Give feedback.
I think I mixed up the names of the modules and you are using AMQP 0.9.1. Either way, please upgrade.