Skip to content

Commit

Permalink
Merge pull request #31 from malakaganga/fix_inbound_name
Browse files Browse the repository at this point in the history
Add inbound name to the message context
malakaganga authored Oct 23, 2024
2 parents d5b98d8 + 5c05bc3 commit 0b42dc4
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .connector-store/meta.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
],
"releases": [
{
"tagName": "v1.1.1",
"tagName": "v1.1.3",
"products": [
"MI 1.2.0",
"MI 4.0.0",
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.synapse.inbound.amazonsqs</groupId>
<artifactId>org.apache.synapse.amazonsqs.poll.class</artifactId>
<version>1.1.2</version>
<version>1.1.3</version>
<name>AmazonSQS Polling Consumer</name>
<url>http://wso2.org</url>
<packaging>bundle</packaging>
Original file line number Diff line number Diff line change
@@ -37,4 +37,5 @@ public class AmazonSQSConstants {
public static final String ATTRIBUTE_NAMES = "attributeNames";
public static final String ALL = "All";
public static final String AUTO_REMOVE_MESSAGE = "autoRemoveMessage";
public static final String INBOUND_ENDPOINT_NAME = "inbound.endpoint.name";
}
Original file line number Diff line number Diff line change
@@ -266,6 +266,7 @@ protected boolean injectMessage(String strMessage, String contentType) {
}
org.apache.axis2.context.MessageContext axis2MsgCtx = ((Axis2MessageContext) msgCtx).getAxis2MessageContext();
Builder builder;
msgCtx.setProperty(AmazonSQSConstants.INBOUND_ENDPOINT_NAME, name);
if (StringUtils.isEmpty(contentType)) {
logger.warn("Unable to determine content type for message, setting to text/plain for " + name);
contentType = AmazonSQSConstants.DEFAULT_CONTENT_TYPE;

0 comments on commit 0b42dc4

Please sign in to comment.