[jira] [Commented] (NIFI-6721) jms_expiration attribute problem
[ https://issues.apache.org/jira/browse/NIFI-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17770913#comment-17770913 ] ASF subversion and git services commented on NIFI-6721: --- Commit 9b9dd4bae3be28057ada9fcfeca9f8e3efb79abd in nifi's branch refs/heads/main from annanys23 [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=9b9dd4bae3 ] NIFI-6721: This closes #7789. jms_expiration attribute problem fix Originally authored in part by sjyang18 Signed-off-by: Joseph Witt > jms_expiration attribute problem > > > Key: NIFI-6721 > URL: https://issues.apache.org/jira/browse/NIFI-6721 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.8.0 > Environment: Linux CENTOS 7 >Reporter: Tim Chermak >Assignee: Anna Nys >Priority: Minor > Fix For: 1.latest, 2.latest > > Time Spent: 40m > Remaining Estimate: 0h > > The documentation for PublishJMS indicates the JMSExpiration is set with the > attribute jms_expiration. However, this value is really the time-to-live > (ttl) in milliseconds. The JMSExpiration is calculated by the provider > library as "expiration = timestamp + ttl" > So, this NiFi flowfile attribute should really be named jms_ttl. The current > setup works correctly when NiFi creates and publishes a message, but has > problems when you try to republish a JMS message. > GetFile -> UpdateAttibute -> PublishJMS creates a valid JMSExpiration in the > message, however, when a JMS has the expiration set, ConsumeJMS -> PublishJMS > shows an error in the nifi.--app.log file: > "o.apache.nifi.jms.processors.PublishJMS PublishJMS[id=016b1005-xx...] > Incompatible value for attribute jms_expiration [1566428032803] is not a > number. Ignoring this attribute." > Looks like ConsumeJMS set the flowfile attribute to the expiration value > rather than the time-ti-live value. Time-to-live should be jms_ttl = > expiration - current_time. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-6721) jms_expiration attribute problem
[ https://issues.apache.org/jira/browse/NIFI-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17768808#comment-17768808 ] Joe Witt commented on NIFI-6721: The ticket should remain open until the PR is reviewed and merged. Also set proper fix versions assuming this is meant for both the main/2.x line and the support/nifi-1.x lines. > jms_expiration attribute problem > > > Key: NIFI-6721 > URL: https://issues.apache.org/jira/browse/NIFI-6721 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.8.0 > Environment: Linux CENTOS 7 >Reporter: Tim Chermak >Assignee: Anna Nys >Priority: Minor > Fix For: 2.latest > > Time Spent: 40m > Remaining Estimate: 0h > > The documentation for PublishJMS indicates the JMSExpiration is set with the > attribute jms_expiration. However, this value is really the time-to-live > (ttl) in milliseconds. The JMSExpiration is calculated by the provider > library as "expiration = timestamp + ttl" > So, this NiFi flowfile attribute should really be named jms_ttl. The current > setup works correctly when NiFi creates and publishes a message, but has > problems when you try to republish a JMS message. > GetFile -> UpdateAttibute -> PublishJMS creates a valid JMSExpiration in the > message, however, when a JMS has the expiration set, ConsumeJMS -> PublishJMS > shows an error in the nifi.--app.log file: > "o.apache.nifi.jms.processors.PublishJMS PublishJMS[id=016b1005-xx...] > Incompatible value for attribute jms_expiration [1566428032803] is not a > number. Ignoring this attribute." > Looks like ConsumeJMS set the flowfile attribute to the expiration value > rather than the time-ti-live value. Time-to-live should be jms_ttl = > expiration - current_time. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-6721) jms_expiration attribute problem
[ https://issues.apache.org/jira/browse/NIFI-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17201508#comment-17201508 ] Tim Chermak commented on NIFI-6721: --- Hi, thanks for the update, sorry it took so long to get back. Let me see if I can work with our end developer/user see if this can work. > jms_expiration attribute problem > > > Key: NIFI-6721 > URL: https://issues.apache.org/jira/browse/NIFI-6721 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.8.0 > Environment: Linux CENTOS 7 >Reporter: Tim Chermak >Assignee: Seokwon Yang >Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > The documentation for PublishJMS indicates the JMSExpiration is set with the > attribute jms_expiration. However, this value is really the time-to-live > (ttl) in milliseconds. The JMSExpiration is calculated by the provider > library as "expiration = timestamp + ttl" > So, this NiFi flowfile attribute should really be named jms_ttl. The current > setup works correctly when NiFi creates and publishes a message, but has > problems when you try to republish a JMS message. > GetFile -> UpdateAttibute -> PublishJMS creates a valid JMSExpiration in the > message, however, when a JMS has the expiration set, ConsumeJMS -> PublishJMS > shows an error in the nifi.--app.log file: > "o.apache.nifi.jms.processors.PublishJMS PublishJMS[id=016b1005-xx...] > Incompatible value for attribute jms_expiration [1566428032803] is not a > number. Ignoring this attribute." > Looks like ConsumeJMS set the flowfile attribute to the expiration value > rather than the time-ti-live value. Time-to-live should be jms_ttl = > expiration - current_time. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-6721) jms_expiration attribute problem
[ https://issues.apache.org/jira/browse/NIFI-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17119088#comment-17119088 ] Seokwon Yang commented on NIFI-6721: [~tchermak] I have a patch for this work. [https://github.com/apache/nifi/pull/4270] Would you take a look at and test out? > jms_expiration attribute problem > > > Key: NIFI-6721 > URL: https://issues.apache.org/jira/browse/NIFI-6721 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.8.0 > Environment: Linux CENTOS 7 >Reporter: Tim Chermak >Assignee: Seokwon Yang >Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > The documentation for PublishJMS indicates the JMSExpiration is set with the > attribute jms_expiration. However, this value is really the time-to-live > (ttl) in milliseconds. The JMSExpiration is calculated by the provider > library as "expiration = timestamp + ttl" > So, this NiFi flowfile attribute should really be named jms_ttl. The current > setup works correctly when NiFi creates and publishes a message, but has > problems when you try to republish a JMS message. > GetFile -> UpdateAttibute -> PublishJMS creates a valid JMSExpiration in the > message, however, when a JMS has the expiration set, ConsumeJMS -> PublishJMS > shows an error in the nifi.--app.log file: > "o.apache.nifi.jms.processors.PublishJMS PublishJMS[id=016b1005-xx...] > Incompatible value for attribute jms_expiration [1566428032803] is not a > number. Ignoring this attribute." > Looks like ConsumeJMS set the flowfile attribute to the expiration value > rather than the time-ti-live value. Time-to-live should be jms_ttl = > expiration - current_time. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-6721) jms_expiration attribute problem
[ https://issues.apache.org/jira/browse/NIFI-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17046950#comment-17046950 ] Tim Chermak commented on NIFI-6721: --- Message from our developer/user: JMSTemplate shouldn't have setExpiration because that is one of the fields that a user can't set directly. The user should call setTimeToLive, and the provider client library will set the expiration based on the timeToLive (TTL). The real problem is explained earlier. The documentation for PublishJMS says that the JMSExpiration is set with the attribute jms_expiration. However, this value is really time-to-live in milliseconds. The JMSExpiration is calculated by the provider client library as; expiration = timestamp + ttl So, this nifi flowfile attribute really be named jms_ttl Change the name of the flowfile attribute to jms_ttl, and pass that to setTimeToLive. This works for messages published by NiFi, but for messages received by NiFi, you have to recalculate the TTL. jms_ttl = expiration - timestamp Since there may be delays in processing the message, it may be better to use the current time jsm_ttl = expiration - now() You want to set the jms_expiration attribute of a flowfile with the value in the JMS message, and you want to add the flowfile attribute jms_ttl as calculated above. > jms_expiration attribute problem > > > Key: NIFI-6721 > URL: https://issues.apache.org/jira/browse/NIFI-6721 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.8.0 > Environment: Linux CENTOS 7 >Reporter: Tim Chermak >Priority: Minor > > The documentation for PublishJMS indicates the JMSExpiration is set with the > attribute jms_expiration. However, this value is really the time-to-live > (ttl) in milliseconds. The JMSExpiration is calculated by the provider > library as "expiration = timestamp + ttl" > So, this NiFi flowfile attribute should really be named jms_ttl. The current > setup works correctly when NiFi creates and publishes a message, but has > problems when you try to republish a JMS message. > GetFile -> UpdateAttibute -> PublishJMS creates a valid JMSExpiration in the > message, however, when a JMS has the expiration set, ConsumeJMS -> PublishJMS > shows an error in the nifi.--app.log file: > "o.apache.nifi.jms.processors.PublishJMS PublishJMS[id=016b1005-xx...] > Incompatible value for attribute jms_expiration [1566428032803] is not a > number. Ignoring this attribute." > Looks like ConsumeJMS set the flowfile attribute to the expiration value > rather than the time-ti-live value. Time-to-live should be jms_ttl = > expiration - current_time. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-6721) jms_expiration attribute problem
[ https://issues.apache.org/jira/browse/NIFI-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17046665#comment-17046665 ] Tim Chermak commented on NIFI-6721: --- Hi, OK, I see what you are saying. So can this be fixed so that expiration is not handled this way and time to live is properly calculated in ConsumeJMS > jms_expiration attribute problem > > > Key: NIFI-6721 > URL: https://issues.apache.org/jira/browse/NIFI-6721 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.8.0 > Environment: Linux CENTOS 7 >Reporter: Tim Chermak >Priority: Minor > > The documentation for PublishJMS indicates the JMSExpiration is set with the > attribute jms_expiration. However, this value is really the time-to-live > (ttl) in milliseconds. The JMSExpiration is calculated by the provider > library as "expiration = timestamp + ttl" > So, this NiFi flowfile attribute should really be named jms_ttl. The current > setup works correctly when NiFi creates and publishes a message, but has > problems when you try to republish a JMS message. > GetFile -> UpdateAttibute -> PublishJMS creates a valid JMSExpiration in the > message, however, when a JMS has the expiration set, ConsumeJMS -> PublishJMS > shows an error in the nifi.--app.log file: > "o.apache.nifi.jms.processors.PublishJMS PublishJMS[id=016b1005-xx...] > Incompatible value for attribute jms_expiration [1566428032803] is not a > number. Ignoring this attribute." > Looks like ConsumeJMS set the flowfile attribute to the expiration value > rather than the time-ti-live value. Time-to-live should be jms_ttl = > expiration - current_time. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-6721) jms_expiration attribute problem
[ https://issues.apache.org/jira/browse/NIFI-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17025939#comment-17025939 ] Tim Chermak commented on NIFI-6721: --- OK, let me take a look into this and get back. > jms_expiration attribute problem > > > Key: NIFI-6721 > URL: https://issues.apache.org/jira/browse/NIFI-6721 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.8.0 > Environment: Linux CENTOS 7 >Reporter: Tim Chermak >Priority: Minor > > The documentation for PublishJMS indicates the JMSExpiration is set with the > attribute jms_expiration. However, this value is really the time-to-live > (ttl) in milliseconds. The JMSExpiration is calculated by the provider > library as "expiration = timestamp + ttl" > So, this NiFi flowfile attribute should really be named jms_ttl. The current > setup works correctly when NiFi creates and publishes a message, but has > problems when you try to republish a JMS message. > GetFile -> UpdateAttibute -> PublishJMS creates a valid JMSExpiration in the > message, however, when a JMS has the expiration set, ConsumeJMS -> PublishJMS > shows an error in the nifi.--app.log file: > "o.apache.nifi.jms.processors.PublishJMS PublishJMS[id=016b1005-xx...] > Incompatible value for attribute jms_expiration [1566428032803] is not a > number. Ignoring this attribute." > Looks like ConsumeJMS set the flowfile attribute to the expiration value > rather than the time-ti-live value. Time-to-live should be jms_ttl = > expiration - current_time. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-6721) jms_expiration attribute problem
[ https://issues.apache.org/jira/browse/NIFI-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17025476#comment-17025476 ] Joey Frazee commented on NIFI-6721: --- Looks like the source of the mistake is that the Spring JmsTemplate doesn't actually have a setExpiration() so as you're seeing, the value got used with setTimeToLive(): https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSPublisher.java#L85 > jms_expiration attribute problem > > > Key: NIFI-6721 > URL: https://issues.apache.org/jira/browse/NIFI-6721 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.8.0 > Environment: Linux CENTOS 7 >Reporter: Tim Chermak >Priority: Minor > > The documentation for PublishJMS indicates the JMSExpiration is set with the > attribute jms_expiration. However, this value is really the time-to-live > (ttl) in milliseconds. The JMSExpiration is calculated by the provider > library as "expiration = timestamp + ttl" > So, this NiFi flowfile attribute should really be named jms_ttl. The current > setup works correctly when NiFi creates and publishes a message, but has > problems when you try to republish a JMS message. > GetFile -> UpdateAttibute -> PublishJMS creates a valid JMSExpiration in the > message, however, when a JMS has the expiration set, ConsumeJMS -> PublishJMS > shows an error in the nifi.--app.log file: > "o.apache.nifi.jms.processors.PublishJMS PublishJMS[id=016b1005-xx...] > Incompatible value for attribute jms_expiration [1566428032803] is not a > number. Ignoring this attribute." > Looks like ConsumeJMS set the flowfile attribute to the expiration value > rather than the time-ti-live value. Time-to-live should be jms_ttl = > expiration - current_time. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-6721) jms_expiration attribute problem
[ https://issues.apache.org/jira/browse/NIFI-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17025468#comment-17025468 ] Joey Frazee commented on NIFI-6721: --- [~tchermak] what provider(s) have you seen this with? > jms_expiration attribute problem > > > Key: NIFI-6721 > URL: https://issues.apache.org/jira/browse/NIFI-6721 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.8.0 > Environment: Linux CENTOS 7 >Reporter: Tim Chermak >Priority: Minor > > The documentation for PublishJMS indicates the JMSExpiration is set with the > attribute jms_expiration. However, this value is really the time-to-live > (ttl) in milliseconds. The JMSExpiration is calculated by the provider > library as "expiration = timestamp + ttl" > So, this NiFi flowfile attribute should really be named jms_ttl. The current > setup works correctly when NiFi creates and publishes a message, but has > problems when you try to republish a JMS message. > GetFile -> UpdateAttibute -> PublishJMS creates a valid JMSExpiration in the > message, however, when a JMS has the expiration set, ConsumeJMS -> PublishJMS > shows an error in the nifi.--app.log file: > "o.apache.nifi.jms.processors.PublishJMS PublishJMS[id=016b1005-xx...] > Incompatible value for attribute jms_expiration [1566428032803] is not a > number. Ignoring this attribute." > Looks like ConsumeJMS set the flowfile attribute to the expiration value > rather than the time-ti-live value. Time-to-live should be jms_ttl = > expiration - current_time. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-6721) jms_expiration attribute problem
[ https://issues.apache.org/jira/browse/NIFI-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17016351#comment-17016351 ] Tim Chermak commented on NIFI-6721: --- Hi, yes, this is from one of our other developers/users, but they said it is still an issue. Thanks -Tim > jms_expiration attribute problem > > > Key: NIFI-6721 > URL: https://issues.apache.org/jira/browse/NIFI-6721 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.8.0 > Environment: Linux CENTOS 7 >Reporter: Tim Chermak >Priority: Minor > > The documentation for PublishJMS indicates the JMSExpiration is set with the > attribute jms_expiration. However, this value is really the time-to-live > (ttl) in milliseconds. The JMSExpiration is calculated by the provider > library as "expiration = timestamp + ttl" > So, this NiFi flowfile attribute should really be named jms_ttl. The current > setup works correctly when NiFi creates and publishes a message, but has > problems when you try to republish a JMS message. > GetFile -> UpdateAttibute -> PublishJMS creates a valid JMSExpiration in the > message, however, when a JMS has the expiration set, ConsumeJMS -> PublishJMS > shows an error in the nifi.--app.log file: > "o.apache.nifi.jms.processors.PublishJMS PublishJMS[id=016b1005-xx...] > Incompatible value for attribute jms_expiration [1566428032803] is not a > number. Ignoring this attribute." > Looks like ConsumeJMS set the flowfile attribute to the expiration value > rather than the time-ti-live value. Time-to-live should be jms_ttl = > expiration - current_time. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-6721) jms_expiration attribute problem
[ https://issues.apache.org/jira/browse/NIFI-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17015395#comment-17015395 ] Muazma Zahid commented on NIFI-6721: Is this Issue still valid [~tchermak]? If yes I can work on this. > jms_expiration attribute problem > > > Key: NIFI-6721 > URL: https://issues.apache.org/jira/browse/NIFI-6721 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.8.0 > Environment: Linux CENTOS 7 >Reporter: Tim Chermak >Priority: Minor > > The documentation for PublishJMS indicates the JMSExpiration is set with the > attribute jms_expiration. However, this value is really the time-to-live > (ttl) in milliseconds. The JMSExpiration is calculated by the provider > library as "expiration = timestamp + ttl" > So, this NiFi flowfile attribute should really be named jms_ttl. The current > setup works correctly when NiFi creates and publishes a message, but has > problems when you try to republish a JMS message. > GetFile -> UpdateAttibute -> PublishJMS creates a valid JMSExpiration in the > message, however, when a JMS has the expiration set, ConsumeJMS -> PublishJMS > shows an error in the nifi.--app.log file: > "o.apache.nifi.jms.processors.PublishJMS PublishJMS[id=016b1005-xx...] > Incompatible value for attribute jms_expiration [1566428032803] is not a > number. Ignoring this attribute." > Looks like ConsumeJMS set the flowfile attribute to the expiration value > rather than the time-ti-live value. Time-to-live should be jms_ttl = > expiration - current_time. > -- This message was sent by Atlassian Jira (v8.3.4#803005)