benumbed / nim-amqp Goto Github PK
View Code? Open in Web Editor NEWAMQP 0-9-1 library in pure Nim
License: BSD 3-Clause "New" or "Revised" License
AMQP 0-9-1 library in pure Nim
License: BSD 3-Clause "New" or "Revised" License
I'm connecting through an SSH tunnel to my RabbitMQ server.
When i kill the SSH tunnel (to simulate a network outage).
The consumer (basic consumer example) goes into an endless loop.
I've not found the receive that does this yet but an strace reveals the issue:
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2298, ...}) = 0
getpid() = 19840
write(1, "\33[92mDBG\33[0m 2020-09-19 23:51:04"..., 176) = 176
rt_sigaction(SIGINT, {sa_handler=0x561c3770e866, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f65e81116a0}, {sa_handler=0x561c3765d107, sa_mask=[INT], sa_flags=SA_RESTOR ER|SA_RESTART, sa_restorer=0x7f65e81116a0}, 8) = 0
#
# Somwhere here i killed the SSH tunnel
#
select(7, [6], NULL, NULL, NULL) = 1 (in [6])
select(7, [6], NULL, NULL, {tv_sec=0, tv_usec=500000}) = 1 (in [6], left {tv_sec=0, tv_usec=499997})
recvfrom(6, "", 4000, 0, NULL, NULL) = 0
select(7, [6], NULL, NULL, NULL) = 1 (in [6])
select(7, [6], NULL, NULL, {tv_sec=0, tv_usec=500000}) = 1 (in [6], left {tv_sec=0, tv_usec=499998})
recvfrom(6, "", 4000, 0, NULL, NULL) = 0
# Endless loop from here on .....
if i have better infos, i'll report
When the payload is empty the msgHandler is not called,
so there is no way to ack manualy and RabbitMQ reports them as "Unacked".
The output thats generated is (for each message):
DBG 2020-09-19 22:25:10.470+02:00 Content Header tid=13830 classId=60 weight=0 bodySize=0 propFlags=12288
DBG 2020-09-19 22:25:10.470+02:00 basic.deliver tid=13830 consumerTag=amq.ctag-2XyR-_2D_Jv73iYKzOCH9w deliveryTag=8 redelivered=true exchangeName= routingKey=youtube_song
i basically use your example consumer (with my logic added in the handler), if you need more information please say so.
(could be that i've missed something :) )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.