# Logstash plugin 0.5 fraction on number field

**URL:** <https://discuss.elastic.co/t/logstash-plugin-0-5-fraction-on-number-field/303890>\
**Category:** Logstash\
**Created:** [May 4, 2022, 2:30am UTC](https://discuss.elastic.co/t/logstash-plugin-0-5-fraction-on-number-field/303890 "2022-05-04T02:30:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Altiano\_Gerung](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/altiano_gerung/32/38040_2.png) [@Altiano\_Gerung](https://discuss.elastic.co/u/Altiano_Gerung)\
**Post date:** [May 4, 2022, 2:30am UTC](https://discuss.elastic.co/t/logstash-plugin-0-5-fraction-on-number-field/303890/1 "2022-05-04T02:30:05Z")

</div>

With logstash google pub/sub output plugin..

How do you set :

```auto
delay_threshold_secs => "0.5"

```

?

If I set to `1.x` or `2.x`, it'll work, but for `0.x` it'll never work, so I guess it's just a matter of syntax error..

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [May 4, 2022, 3:27am UTC](https://discuss.elastic.co/t/logstash-plugin-0-5-fraction-on-number-field/303890/2 "2022-05-04T03:27:46Z")

</div>

The pubsub output [calls](https://github.com/logstash-plugins/logstash-output-google_pubsub/blob/5dd96d7bac35ef8dfaff35804bab0c0fa1a2e896/lib/logstash/outputs/pubsub/client.rb#L22) the [.ofSeconds](https://github.com/ThreeTen/threetenbp/blob/a3018a49e328d5be6b0307a9b09c06754b897d18/src/main/java/org/threeten/bp/Duration.java#L184) method, which sets the fractional part of the second to zero. 2.x is 2 etc.

As far as I know, logstash does not support any Java versions that would require a JSR-310 backport, so the output could be updated not to require it. But fixing that would not fix this.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 1, 2022, 3:27am UTC](https://discuss.elastic.co/t/logstash-plugin-0-5-fraction-on-number-field/303890/3 "2022-06-01T03:27:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
