Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3531861
D3830.id11865.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3830.id11865.diff
View Options
diff --git a/services/tunnelbroker/src/Amqp/AmqpManager.cpp b/services/tunnelbroker/src/Amqp/AmqpManager.cpp
--- a/services/tunnelbroker/src/Amqp/AmqpManager.cpp
+++ b/services/tunnelbroker/src/Amqp/AmqpManager.cpp
@@ -37,8 +37,8 @@
});
AMQP::Table arguments;
- arguments["x-message-ttl"] = AMQP_MESSAGE_TTL;
- arguments["x-expires"] = AMQP_QUEUE_TTL;
+ arguments["x-message-ttl"] = std::to_string(AMQP_MESSAGE_TTL);
+ arguments["x-expires"] = std::to_string(AMQP_QUEUE_TTL);
this->amqpChannel->declareExchange(fanoutExchangeName, AMQP::fanout);
this->amqpChannel->declareQueue(tunnelbrokerID, AMQP::durable, arguments)
.onSuccess([this, tunnelbrokerID, fanoutExchangeName](
@@ -61,10 +61,12 @@
try {
AMQP::Table headers = message.headers();
const std::string payload(message.body());
- const std::string messageID(headers[AMQP_HEADER_MESSAGEID]);
- const std::string toDeviceID(headers[AMQP_HEADER_TO_DEVICEID]);
+ const std::string messageID(
+ headers[AMQP_HEADER_MESSAGEID].get());
+ const std::string toDeviceID(
+ headers[AMQP_HEADER_TO_DEVICEID].get());
const std::string fromDeviceID(
- headers[AMQP_HEADER_FROM_DEVICEID]);
+ headers[AMQP_HEADER_FROM_DEVICEID].get());
std::cout << "AMQP: Message consumed for deviceID: "
<< toDeviceID << std::endl;
DeliveryBroker::getInstance().push(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 8:12 AM (9 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2704567
Default Alt Text
D3830.id11865.diff (1 KB)
Attached To
Mode
D3830: [services] Tunnelbroker - Fix warnings during the AmqpManager build
Attached
Detach File
Event Timeline
Log In to Comment