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
SmppNLSTSplitter for sending messages using National Language Shift Table #1323
Conversation
i wonder if you can apply this patch 2.18.x branch as well? |
Can you please Change the commit message? I think there is a typo :-) |
Sorry, it was a typo :) |
Me or @davsclaus will review soon :-) thanks for your contribution! |
@davsclaus this looks good to me. What do you think? |
i'm using this splitter in production without any issue. i can confirm that it's working for Turkish NLST is working. |
import org.slf4j.LoggerFactory; | ||
|
||
/** | ||
* Created by engin on 30/11/2016. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this kind of javadoc comments
@@ -0,0 +1,100 @@ | |||
package org.apache.camel.component.smpp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add ASF license header
|
||
|
||
protected static final int UDHIE_SAR_REF_NUM_LENGTH = 1; | ||
// protected static final byte UDHIE_IDENTIFIER_SAR = 0x00; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented out code, or explain why its commented out
} else { | ||
lengthOfData = segmentLength; | ||
} | ||
logger.info("Length of data = {}", lengthOfData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log at DEBUG level
logger.info("Length of data = {}", lengthOfData); | ||
|
||
segments[i] = new byte[UDHIE_NLI_MULTI_MSG_HEADER_REAL_LENGTH + lengthOfData]; | ||
logger.info("segments[{}].length = {}", i, segments[i].length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
if (null != splitter){ | ||
return splitter; | ||
} | ||
logger.warn("Invalid splitter given. Must be instance of SmppSplitter"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not throw an exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 better to throw exception. thanks for the tip
@@ -0,0 +1,63 @@ | |||
package org.apache.camel.component.smpp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASF license header
import static org.junit.Assert.assertEquals; | ||
|
||
/** | ||
* Created by engin on 30/11/2016. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
And there is likely also some checkstyle issues to fix |
My comment was only about the feature. I didn't review the code :-) |
okay, i'm dealing with the mess.. |
added ASF license headers invalid splitter throws exception
Looks better. @oscerd can you take a look as well and merge if okay. |
Sure :-) |
Thanks the PR has been merged. Can you close this? |
Great, thank you guys.. |
Thanks a lot for the contrib @roadrunner :-) |
i hope, i'll be doing more soon 👍 |
[ENTESB-11189]make camel-elasticsearch-rest feature self-contained
to support sending messages with National Language Shift Tables, there are two thing needs to be taken care of:
even if the short message is only one part, we need to set UDHI; we are using esm_class.
splitting messages for locking tables:
155 characters allowed when submitting single short message
149 characters allowed when submitting multipart short messages
i've added test cases for splitting