Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception when sending a message with event ID using transport protocol #189

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Connect (4.0.0)
# Connect (4.0.1)

The "Connect" component is responsible for the communication with a target system.
This component implements the logic of the interaction protocol, receiving and sending messages from and to the system, respectively.
Expand Down Expand Up @@ -127,6 +127,12 @@ spec:

## Release notes

### 4.0.1

#### Fixed:

+ Exception when processing sent message with event ID

### 4.0.0

+ Migration to books/pages cradle 5.0.0
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
release_version = 4.0.0
release_version = 4.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void start() {

logger.info("Subscribing to transport queue with messages to send");

subscriberMonitor = router.subscribeAll(this, SEND_ATTRIBUTE, QueueAttribute.RAW.getValue());
subscriberMonitor = router.subscribeAll(this, SEND_ATTRIBUTE);
}

public void stop() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ public static MessageGroup convertToGroup(ConnectivityMessage connectivityMessag
if (SailfishMetadataExtensions.contains(sfMetadata, MetadataProperty.PARENT_EVENT_ID)) {
EventID parentEventID = SailfishMetadataExtensions.getParentEventID(sfMetadata);
// Should never happen because the Sailfish does not support sending multiple messages at once
if (rawMessage.getEventId() != null) {
LOGGER.warn("The parent ID is already set for message {}. Current ID: {}, New ID: {}",
messageId, rawMessage.getEventId(), parentEventID);
}
// This check is removed because raw message builder throws an IllegalStateException
// if the event ID is not set
// if (rawMessage.getEventId() != null) {
// LOGGER.warn("The parent ID is already set for message {}. Current ID: {}, New ID: {}",
// messageId, rawMessage.getEventId(), parentEventID);
// }
rawMessage.setEventId(EventUtilsKt.toTransport(parentEventID));
}
Map<String, String> props = defaultIfNull(getMessageProperties(sfMetadata), Collections.emptyMap());
Expand Down