RabbitMQ and IoT device: keep queue open?
up vote
0
down vote
favorite
We're using RabbitMQ in a new project. We'll have IoT devices communicating with queues.
For the devices to send info to the cloud we don't see any issues, however sometimes we need to deliver messages from our backend to the IoT devices. For this we let the devices open an exclusive queue. This works perfectly, as long as the devices are online. When they aren't, the queue is closed and no messages can be send to it anymore.
Is there a way to keep the queue open, so messages are kept until the IoT device comes back online?
Vice-versa: Is there some way to have guaranteed delivery starting at the IoT device. For example: energy measurements every 15 minutes. If the connection drops, messages should be stored on disk (to prevent message loss in case of power cut). They are sent later on when the connection comes back online. Does a service or client library exist that implements this or do we need to develop this ourselves?
rabbitmq
add a comment |
up vote
0
down vote
favorite
We're using RabbitMQ in a new project. We'll have IoT devices communicating with queues.
For the devices to send info to the cloud we don't see any issues, however sometimes we need to deliver messages from our backend to the IoT devices. For this we let the devices open an exclusive queue. This works perfectly, as long as the devices are online. When they aren't, the queue is closed and no messages can be send to it anymore.
Is there a way to keep the queue open, so messages are kept until the IoT device comes back online?
Vice-versa: Is there some way to have guaranteed delivery starting at the IoT device. For example: energy measurements every 15 minutes. If the connection drops, messages should be stored on disk (to prevent message loss in case of power cut). They are sent later on when the connection comes back online. Does a service or client library exist that implements this or do we need to develop this ourselves?
rabbitmq
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
We're using RabbitMQ in a new project. We'll have IoT devices communicating with queues.
For the devices to send info to the cloud we don't see any issues, however sometimes we need to deliver messages from our backend to the IoT devices. For this we let the devices open an exclusive queue. This works perfectly, as long as the devices are online. When they aren't, the queue is closed and no messages can be send to it anymore.
Is there a way to keep the queue open, so messages are kept until the IoT device comes back online?
Vice-versa: Is there some way to have guaranteed delivery starting at the IoT device. For example: energy measurements every 15 minutes. If the connection drops, messages should be stored on disk (to prevent message loss in case of power cut). They are sent later on when the connection comes back online. Does a service or client library exist that implements this or do we need to develop this ourselves?
rabbitmq
We're using RabbitMQ in a new project. We'll have IoT devices communicating with queues.
For the devices to send info to the cloud we don't see any issues, however sometimes we need to deliver messages from our backend to the IoT devices. For this we let the devices open an exclusive queue. This works perfectly, as long as the devices are online. When they aren't, the queue is closed and no messages can be send to it anymore.
Is there a way to keep the queue open, so messages are kept until the IoT device comes back online?
Vice-versa: Is there some way to have guaranteed delivery starting at the IoT device. For example: energy measurements every 15 minutes. If the connection drops, messages should be stored on disk (to prevent message loss in case of power cut). They are sent later on when the connection comes back online. Does a service or client library exist that implements this or do we need to develop this ourselves?
rabbitmq
rabbitmq
asked Nov 9 at 19:46
rept
80211130
80211130
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Is there a way to keep the queue open, so messages are kept until the
IoT device comes back online?
Use a regular queue, and make sure it's durable if you'd like it to survive RabbitMQ restarts.
Is there some way to have guaranteed delivery starting at the IoT
device.
That depends on the library you are using, but you don't tell us what library nor what protocol you're using (AMQP vs MQTT, for instance).
Some libraries offer automatic reconnect and re-creation of topology (queues, exchanges, etc) but I'm not aware of any that offer local storage of messages until the broker is available again. You'll have to code that yourself.
Please carefully read the documentation with regard to publisher confirmations and consumer acknowledgements, as those are both necessary for reliable messaging link.
NOTE: the RabbitMQ team monitors the rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow.
Thanks. We use AMQP. The IoT devices are connected through 4G to the cloud. So there aren't any libraries that cache the requests to the Queue locally on the IoT device if the connection to the RabbitMQ server can't be made? This to me would seem like a problem that many developers would face?
– rept
Nov 9 at 21:32
Like I said, I'm not aware of any libraries that do that for you. Since an AMQP message body is just a sequence of bytes, writing that data to local durable storage prior to sending the message and deleting it after getting the publisher confirmation shouldn't be too difficult.
– Luke Bakken
Nov 10 at 13:38
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Is there a way to keep the queue open, so messages are kept until the
IoT device comes back online?
Use a regular queue, and make sure it's durable if you'd like it to survive RabbitMQ restarts.
Is there some way to have guaranteed delivery starting at the IoT
device.
That depends on the library you are using, but you don't tell us what library nor what protocol you're using (AMQP vs MQTT, for instance).
Some libraries offer automatic reconnect and re-creation of topology (queues, exchanges, etc) but I'm not aware of any that offer local storage of messages until the broker is available again. You'll have to code that yourself.
Please carefully read the documentation with regard to publisher confirmations and consumer acknowledgements, as those are both necessary for reliable messaging link.
NOTE: the RabbitMQ team monitors the rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow.
Thanks. We use AMQP. The IoT devices are connected through 4G to the cloud. So there aren't any libraries that cache the requests to the Queue locally on the IoT device if the connection to the RabbitMQ server can't be made? This to me would seem like a problem that many developers would face?
– rept
Nov 9 at 21:32
Like I said, I'm not aware of any libraries that do that for you. Since an AMQP message body is just a sequence of bytes, writing that data to local durable storage prior to sending the message and deleting it after getting the publisher confirmation shouldn't be too difficult.
– Luke Bakken
Nov 10 at 13:38
add a comment |
up vote
0
down vote
accepted
Is there a way to keep the queue open, so messages are kept until the
IoT device comes back online?
Use a regular queue, and make sure it's durable if you'd like it to survive RabbitMQ restarts.
Is there some way to have guaranteed delivery starting at the IoT
device.
That depends on the library you are using, but you don't tell us what library nor what protocol you're using (AMQP vs MQTT, for instance).
Some libraries offer automatic reconnect and re-creation of topology (queues, exchanges, etc) but I'm not aware of any that offer local storage of messages until the broker is available again. You'll have to code that yourself.
Please carefully read the documentation with regard to publisher confirmations and consumer acknowledgements, as those are both necessary for reliable messaging link.
NOTE: the RabbitMQ team monitors the rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow.
Thanks. We use AMQP. The IoT devices are connected through 4G to the cloud. So there aren't any libraries that cache the requests to the Queue locally on the IoT device if the connection to the RabbitMQ server can't be made? This to me would seem like a problem that many developers would face?
– rept
Nov 9 at 21:32
Like I said, I'm not aware of any libraries that do that for you. Since an AMQP message body is just a sequence of bytes, writing that data to local durable storage prior to sending the message and deleting it after getting the publisher confirmation shouldn't be too difficult.
– Luke Bakken
Nov 10 at 13:38
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Is there a way to keep the queue open, so messages are kept until the
IoT device comes back online?
Use a regular queue, and make sure it's durable if you'd like it to survive RabbitMQ restarts.
Is there some way to have guaranteed delivery starting at the IoT
device.
That depends on the library you are using, but you don't tell us what library nor what protocol you're using (AMQP vs MQTT, for instance).
Some libraries offer automatic reconnect and re-creation of topology (queues, exchanges, etc) but I'm not aware of any that offer local storage of messages until the broker is available again. You'll have to code that yourself.
Please carefully read the documentation with regard to publisher confirmations and consumer acknowledgements, as those are both necessary for reliable messaging link.
NOTE: the RabbitMQ team monitors the rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow.
Is there a way to keep the queue open, so messages are kept until the
IoT device comes back online?
Use a regular queue, and make sure it's durable if you'd like it to survive RabbitMQ restarts.
Is there some way to have guaranteed delivery starting at the IoT
device.
That depends on the library you are using, but you don't tell us what library nor what protocol you're using (AMQP vs MQTT, for instance).
Some libraries offer automatic reconnect and re-creation of topology (queues, exchanges, etc) but I'm not aware of any that offer local storage of messages until the broker is available again. You'll have to code that yourself.
Please carefully read the documentation with regard to publisher confirmations and consumer acknowledgements, as those are both necessary for reliable messaging link.
NOTE: the RabbitMQ team monitors the rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow.
answered Nov 9 at 21:16
Luke Bakken
2,4532812
2,4532812
Thanks. We use AMQP. The IoT devices are connected through 4G to the cloud. So there aren't any libraries that cache the requests to the Queue locally on the IoT device if the connection to the RabbitMQ server can't be made? This to me would seem like a problem that many developers would face?
– rept
Nov 9 at 21:32
Like I said, I'm not aware of any libraries that do that for you. Since an AMQP message body is just a sequence of bytes, writing that data to local durable storage prior to sending the message and deleting it after getting the publisher confirmation shouldn't be too difficult.
– Luke Bakken
Nov 10 at 13:38
add a comment |
Thanks. We use AMQP. The IoT devices are connected through 4G to the cloud. So there aren't any libraries that cache the requests to the Queue locally on the IoT device if the connection to the RabbitMQ server can't be made? This to me would seem like a problem that many developers would face?
– rept
Nov 9 at 21:32
Like I said, I'm not aware of any libraries that do that for you. Since an AMQP message body is just a sequence of bytes, writing that data to local durable storage prior to sending the message and deleting it after getting the publisher confirmation shouldn't be too difficult.
– Luke Bakken
Nov 10 at 13:38
Thanks. We use AMQP. The IoT devices are connected through 4G to the cloud. So there aren't any libraries that cache the requests to the Queue locally on the IoT device if the connection to the RabbitMQ server can't be made? This to me would seem like a problem that many developers would face?
– rept
Nov 9 at 21:32
Thanks. We use AMQP. The IoT devices are connected through 4G to the cloud. So there aren't any libraries that cache the requests to the Queue locally on the IoT device if the connection to the RabbitMQ server can't be made? This to me would seem like a problem that many developers would face?
– rept
Nov 9 at 21:32
Like I said, I'm not aware of any libraries that do that for you. Since an AMQP message body is just a sequence of bytes, writing that data to local durable storage prior to sending the message and deleting it after getting the publisher confirmation shouldn't be too difficult.
– Luke Bakken
Nov 10 at 13:38
Like I said, I'm not aware of any libraries that do that for you. Since an AMQP message body is just a sequence of bytes, writing that data to local durable storage prior to sending the message and deleting it after getting the publisher confirmation shouldn't be too difficult.
– Luke Bakken
Nov 10 at 13:38
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53232369%2frabbitmq-and-iot-device-keep-queue-open%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown