This is an automated email from the ASF dual-hosted git repository. tross pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/main by this push: new 95822e3 DISPATCH-2262 - Trimmed down heartbeat message based on Robbie Gemmell's proposed changes. 95822e3 is described below commit 95822e3083449259de90ccdf90a6eb1627420d3d Author: Ted Ross <tr...@apache.org> AuthorDate: Wed Nov 3 14:32:34 2021 -0400 DISPATCH-2262 - Trimmed down heartbeat message based on Robbie Gemmell's proposed changes. --- .../modules/heartbeat_edge/heartbeat_edge.c | 19 ++++--------------- tests/system_tests_heartbeats.py | 2 +- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/router_core/modules/heartbeat_edge/heartbeat_edge.c b/src/router_core/modules/heartbeat_edge/heartbeat_edge.c index b050392..4b55c0f 100644 --- a/src/router_core/modules/heartbeat_edge/heartbeat_edge.c +++ b/src/router_core/modules/heartbeat_edge/heartbeat_edge.c @@ -141,28 +141,17 @@ static qdrc_endpoint_desc_t descriptor = { static void on_timer(qdr_core_t *core, void *context) { qcm_heartbeat_edge_t *client = (qcm_heartbeat_edge_t*) context; - qdr_core_timer_schedule_CT(client->core, client->timer, 1); + qdr_core_timer_schedule_CT(client->core, client->timer, 2); if (client->link_credit > 0) { client->link_credit--; - qd_composed_field_t *fld = qd_compose(QD_PERFORMATIVE_HEADER, 0); - qd_compose_start_list(fld); - qd_compose_insert_bool(fld, 0); // durable - qd_compose_end_list(fld); - - fld = qd_compose(QD_PERFORMATIVE_PROPERTIES, fld); - qd_compose_start_list(fld); - qd_compose_insert_int(fld, client->next_msg_id); // message-id - client->next_msg_id++; - qd_compose_end_list(fld); - qd_composed_field_t *body = qd_compose(QD_PERFORMATIVE_BODY_AMQP_VALUE, 0); - qd_compose_insert_null(body); + qd_compose_insert_int(body, client->next_msg_id); + client->next_msg_id++; qd_message_t *msg = qd_message(); - qd_message_compose_3(msg, fld, body, true); + qd_message_compose_2(msg, body, true); - qd_compose_free(fld); qd_compose_free(body); qdr_delivery_t *dlv = qdrc_endpoint_delivery_CT(client->core, client->endpoint, msg); diff --git a/tests/system_tests_heartbeats.py b/tests/system_tests_heartbeats.py index d2c285d..e5bb859 100644 --- a/tests/system_tests_heartbeats.py +++ b/tests/system_tests_heartbeats.py @@ -144,7 +144,7 @@ class ConnectionCloseTest(MessagingHandler): def send_heartbeat(self): if self.sender.credit > 0 and self.pending: - msg = Message(body=None, properties={'message_id': self.n_tx}) + msg = Message(body=self.n_tx) self.sender.send(msg) self.n_tx += 1 self.pending = False --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org