For recent releases list go to: https://github.com/owen2345/pub_sub_model_sync/releases
chore: improve logs
- feat: rename Payload
:key
into:internal_key
to avoid confusions while debugging
- feat: do not exclude
ordering_key topic_name
when delivering a notification (required when debugging) - doc: improve docs
- feat: change
transactions_max_buffer
default value to 1 to deliver notifications once they were called - feat: use
after_commit
instead ofbefore_commit
callback and remove the horrible AR patch for rails 4
- refactor: improve service exit when running in k8s
This version includes many changes that was refactored from previous version, and thus it needs manual changes to migrate into this version.
- Refactor: Subscribers param renamed
from_action
intoto_action
and added support for block or lambda - Feat: Improved
ps_subscribe
to accept new arguments and support for property mappings - Refactor: Refactored
ps_publish
to be called manually (removes notification assumptions) and accept for new arguments - Feat: Added
ps_after_action
to listen CRUD events to send notifications in the expected order - Feat: Added
config.default_topic_name
to define default topic name whe publishing (by defaultconfig.topic_name
) - Refactor: Refactored PubSub Transactions to support rollbacks (any exception inside transactions can automatically cancel all pending notifications: configurable through
config.transactions_use_buffer
) - Feat: Improved CRUD transactions to deliver inner notifications in the expected order to keep data consistency
- System refactor: Added subscriber runner
- Fix: Class notifications can only be listened by class subscriptions
- Refactor: Removed
publish_model_data
to have a unique model publisherps_publish
- Refactor: Renamed
ps_before_sync
intops_before_publish
,ps_after_sync
intops_after_publish
- Refactor: Renamed
payload.attributes
intopayload.info
- Feat: Support for plain Ruby Objects (Non ActiveRecord models)
- Fix: Retry errors for 5 times before exiting notifications listener
- Feat: Added transactions max_buffer
- Feat: add
ps_perform_publish
to perform the callback for a specific action - Feat: Removed
ps_skip_sync
callback
- feat: add support to include custom payload headers
- feat: add pubsub transactions to process all payloads inside in the same order they were published
- feat: when a model is created/updated/destroyed, process all related payloads in a single transaction
- feat: add method to save processed payload (:ps_processing_payload) when saving sync
- feat: add "ordering_key" support to process all payloads with the same key in the same order
- feat: start multiple workers to process async kafka messages when starting service listeners
- feat: make async publisher by reusing exchange connection (rabbit)
- feat: add support for forced_ordering_key to always be used as the ordering_key if defined
- feat: add feature to publish a message to a custom and/or multiple topics
- feat: add model custom action subscriber and publisher
- feat: add docker compose settings
- feat: remove duplicated callback :ps_before_save_sync (same result can be achieved with :ps_before_save_sync)
- feat: improve message starter to retry when failed or exit system when persists
- feat: fix and retry when database connection error (PG::UnableToSend)
- feat: add method to save processed payload (:ps_processing_payload) when saving sync
- chore: improved readme (Thanks @CharlieIGG)
- feat: move :key into headers
- feat: reformat :publish and :process methods to include non silence methods
- feat: add notification key to payloads (can be used for caching strategies)
- fix: restore google pubsub topic settings
- fix: keep message ordering with google pubsub
- fix: keep message ordering with google pubsub
- fix: does not call :on_error_processing when processing a message
- feat: add method to preload sync listeners
- feat: add payload validation
- feat: add method to rebuild payload
- feat: google-pub/sub receive messages in the same order they were delivered
- fix: google-pub/sub receive messages sequentially and not in parallel (default 5 threads).
- fix: exclude identifiers when syncing model
- feat: callbacks support for future extra params
- feat: make connectors configurable
- feat: add :process! and :process, :publish!, :publish methods to payload
- feat: auto retry 2 times when "could not obtain a database connection within 5.000 seconds..." error occurs
- fix: kafka consume all messages from different apps
- style: use the correct consumer key
- fix: rabbitmq deliver messages to all subscribers
- fix: rabbitmq persist messages to recover after restarting
- Hotfix: auto convert class name into string
- feat: rename publisher callbacks to be more understandable
- feat: add callbacks to listen when processing a message (before saving sync)
- fix: add missing rabbit mock method
- feat: add :publish! and :process! methods to payloads
- feat: add ability to disable publisher globally
- fix: skip notifications from the same application
- fix: rabbitmq use fanout instead of queue to deliver messages to multiple apps
- refactor: include payload object to carry message info
- feat: include notification events (when publishing and when processing messages)
- feat: rabbitMQ skip receiving messages from the same app
- feat: rabbitmq use fanout instead of queue to deliver messages to multiple apps
- Improve
ps_subscriber_changed?
to run validations and check for changes
- chore: remove typo
- chore: improve log messages
- feat: do not update model if no changes
- feat: skip publisher after updating if no changes
- rename as_klass to from_klass and as_action to from_action for subscribers
- refactor subscribers to be independent
- refactor message_publisher to use publisher
- rename publisher into message_publisher
- reformat publisher to reuse connector
- improve rabbit service to use sleep instead of block ("Block is not recommended for production")
- improve message ID
- Support for multiple identifiers when syncing
- Add klass.ps_find_model method for a custom model finder
- Delegate .publish to the .publisher for better understanding
- Improve helper names
- feat: perform manual sync with custom settings
- fix for "IO timeout when reading 7 bytes" error (Rabbit)
- style: do not print processed message when failed
- feat: retry delivery message when failed (RabbitMQ)
- fix default value for cattr_accessor in ror < 5.2
- add callbacks when publishing a message
- Add on demand model sync method
- Add apache kafka support
- Add Service interface for future references
- Improve Services to use a single/common message performer
- Add attribute aliases when publishing,
ps_publish(['name:full_name', 'email'])
- Ability to retrieve publisher/subscriber crud settings
- shorter publisher/subscriber methods: ps_msync_subscribe into ps_subscribe
- fix not found pub/sub library (buggy)
- Add rabbitmq pub/sub service support
- Reformat to support multiple pub/sub services
- Google pub/sub support