You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/04/22 15:20:40 UTC

[GitHub] [camel] ThePrez opened a new pull request #5456: [CAMEL-16417] IBM i Message Queue enhancements (WIP)

ThePrez opened a new pull request #5456:
URL: https://github.com/apache/camel/pull/5456


   - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/projects/CAMEL/issues/CAMEL-16417) filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
   - [ ] Each commit in the pull request should have a meaningful subject line and body.
   - [x] If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [ ] Run `mvn clean install -Psourcecheck` in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
   
   Adding message queue enhancements for IBM i per https://issues.apache.org/jira/projects/CAMEL/issues/CAMEL-16417 and doing slight doc cleanup. Not yet ready for review, but opening draft to allow for early comments 


-- 
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:
users@infra.apache.org



[GitHub] [camel] omarsmak merged pull request #5456: [CAMEL-16417] IBM i Message Queue enhancements

Posted by GitBox <gi...@apache.org>.
omarsmak merged pull request #5456:
URL: https://github.com/apache/camel/pull/5456


   


-- 
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:
users@infra.apache.org



[GitHub] [camel] omarsmak commented on a change in pull request #5456: [CAMEL-16417] IBM i Message Queue enhancements

Posted by GitBox <gi...@apache.org>.
omarsmak commented on a change in pull request #5456:
URL: https://github.com/apache/camel/pull/5456#discussion_r619077666



##########
File path: components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400MsgQueueProducer.java
##########
@@ -50,7 +50,12 @@ public void process(Exchange exchange) throws Exception {
 
     private void process(MessageQueue queue, Exchange exchange) throws Exception {
         String msgText = exchange.getIn().getBody(String.class);
-        queue.sendInformational(msgText);
+        byte[] messageKey = (byte[]) exchange.getIn().getHeader(Jt400Constants.MESSAGE_REPLYTO_KEY);

Review comment:
       You can actually do something like this here instead of the explicit casting
   ```suggestion
           byte[] messageKey =  exchange.getIn().getHeader(Jt400Constants.MESSAGE_REPLYTO_KEY, byte[].class);
   ```

##########
File path: components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400MsgQueueProducer.java
##########
@@ -50,7 +50,12 @@ public void process(Exchange exchange) throws Exception {
 
     private void process(MessageQueue queue, Exchange exchange) throws Exception {
         String msgText = exchange.getIn().getBody(String.class);
-        queue.sendInformational(msgText);
+        byte[] messageKey = (byte[]) exchange.getIn().getHeader(Jt400Constants.MESSAGE_REPLYTO_KEY);
+        if (null != messageKey && !msgText.isEmpty()) {

Review comment:
       For better readability here, I would think this may make more sense:
   ```suggestion
           if (ObjectHelper.isNotEmpty(messageKey) && ObjectHelper.isNotEmpty(msgText)) {
   ```
   
   Whereby `ObjectHelper` is from `org.apache.camel.util.ObjectHelper`




-- 
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:
users@infra.apache.org



[GitHub] [camel] ThePrez commented on pull request #5456: [CAMEL-16417] IBM i Message Queue enhancements

Posted by GitBox <gi...@apache.org>.
ThePrez commented on pull request #5456:
URL: https://github.com/apache/camel/pull/5456#issuecomment-826374665


   Thanks for the review comments! Changes made and sanity checked


-- 
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:
users@infra.apache.org



[GitHub] [camel] ThePrez commented on pull request #5456: [CAMEL-16417] IBM i Message Queue enhancements

Posted by GitBox <gi...@apache.org>.
ThePrez commented on pull request #5456:
URL: https://github.com/apache/camel/pull/5456#issuecomment-826374665


   Thanks for the review comments! Changes made and sanity checked


-- 
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:
users@infra.apache.org