pub_sub_model_sync 0.5.8 → 0.5.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14095a129de1a44dd2f51051e3ee768217eae9ddbaa69b2e9bb3979d857dde5a
4
- data.tar.gz: eeff964335f21b2bc5db23048cf0a09cb8e4d385333f72cf431d9201e107737b
3
+ metadata.gz: f0a2485c0e567e6c012020de909833a5597f5280680b633ea8e9427c51776ddd
4
+ data.tar.gz: ba82cc15b42bd39928fc8eb186c08b811bd1f2de8ca9cae1afc8df28653e284b
5
5
  SHA512:
6
- metadata.gz: 3f85d85ac9f5de88af18848c8511e113a2359c5135b4dba8904e4bbc2b1f72b7be526c9fcdd221761202e9ef8d4630d84e08e9a5d8aa0c2753f98046a514fb70
7
- data.tar.gz: 4788d133e2eaf6b302d34898d5f0d7002556edb357c907f280df137d686c71d7280503a763180f7fb61dece830c41f1263a7d569a868fad0082d13062e7caccd
6
+ metadata.gz: 7751c9ffd368b27cd0e6dcbfd5a79900a2e2bb003eb3be7a210be4182fef4bef950a2d793f9edb4280e82fa3a4c602f67842289df286d9c32a69895f6f488613
7
+ data.tar.gz: 0f4cfca2f370bd4082537619c9654cf21739e07efaa15ee4b7cedbf3892c3141ce722076edcaae9bda6e65f08028a6819aca8dccc7f8a9ed99d3d0703ee9242b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change Log
2
2
 
3
+ # 0.5.8.1 (February 05, 2021)
4
+ - fix: keep message ordering with google pubsub
5
+
3
6
  # 0.5.8 (January 29, 2021)
4
7
  - fix: keep message ordering with google pubsub
5
8
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pub_sub_model_sync (0.5.8)
4
+ pub_sub_model_sync (0.5.8.1)
5
5
  rails
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -313,6 +313,8 @@ config.debug = true
313
313
  - On delete, payload must only be composed by ids
314
314
  - Feature to publish multiple message at a time with the ability to exclude similar messages by klass and action (use the last one)
315
315
  PubSubModelSync::MessagePublisher.batch_publish({ same_keys: :use_last_as_first|:use_last|:use_first_as_last|:keep*, same_data: :use_last_as_first*|:use_last|:use_first_as_last|:keep })
316
+ - Add DB table to use as a shield to skip publishing similar notifications or publish partial notifications (similar idea when processing notif)
317
+ - add callback: on_message_received(payload)
316
318
 
317
319
  ## Q&A
318
320
  - Error "could not obtain a connection from the pool within 5.000 seconds"
@@ -7,7 +7,7 @@ end
7
7
 
8
8
  module PubSubModelSync
9
9
  class ServiceGoogle < ServiceBase
10
- LISTEN_SETTINGS = { threads: { callback: 1 } }.freeze
10
+ LISTEN_SETTINGS = { threads: { callback: 1 }, message_ordering: true, streams: 1 }.freeze
11
11
  TOPIC_SETTINGS = { async: { threads: { publish: 1, callback: 1 } } }.freeze
12
12
  SUBSCRIPTION_SETTINGS = { message_ordering: true }.freeze
13
13
  attr_accessor :service, :topic, :subscription, :subscriber
@@ -45,7 +45,7 @@ module PubSubModelSync
45
45
  private
46
46
 
47
47
  def message_headers
48
- { SERVICE_KEY => true, ordering_key: Time.current.to_i }.merge(PUBLISH_SETTINGS)
48
+ { SERVICE_KEY => true, ordering_key: SERVICE_KEY }.merge(PUBLISH_SETTINGS)
49
49
  end
50
50
 
51
51
  def subscribe_to_topic
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PubSubModelSync
4
- VERSION = '0.5.8'
4
+ VERSION = '0.5.8.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pub_sub_model_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-29 00:00:00.000000000 Z
11
+ date: 2021-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails