pnoltes commented on a change in pull request #174: Feature/pubsub inteceptors
URL: https://github.com/apache/celix/pull/174#discussion_r400135896
##########
File path: bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c
##########
@@ -528,102 +535,111 @@ static int psa_zmq_topicPublicationSend(void* handle,
unsigned int msgTypeId, co
}
if (status == CELIX_SUCCESS /*ser ok*/) {
- pubsub_protocol_message_t message;
- message.payload.payload = serializedOutput;
- message.payload.length = serializedOutputLen;
-
- void *payloadData = NULL;
- size_t payloadLength = 0;
- entry->protSer->encodePayload(entry->protSer->handle, &message,
&payloadData, &payloadLength);
-
- void *metadataData = NULL;
- size_t metadataLength = 0;
- if (metadata != NULL) {
- message.metadata.metadata = metadata;
- entry->protSer->encodeMetadata(entry->protSer->handle,
&message, &metadataData, &metadataLength);
+ if (metadata == NULL) {
+ metadata = celix_properties_create();
Review comment:
postpone this to the interceptor handler and only create metadata is there
are interceptors
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services