Comments (5)
Thanks for the detailed report. Will take a look later this week.
from active_event_store.
I used rails_event_store version 2.1 and the problem disappeared.
Something might have changed with the deserialize method of Rails Event Store gem and it causes errors in Active Event Store job execution.
from active_event_store.
Full error backtrace
ERROR: Error performing OnHubCompanyUpdated::SyncCompany::SubscriberJob (Job ID: 6f094d2d-a383-4c48-94dc-00f63ada7221) from Sidekiq(events_subscribers) in 185291.56ms: ArgumentError (missing keywords: :event_type, :event_id, :data, :metadata):
/Users/arisxama/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/ruby_event_store-2.11.1/lib/ruby_event_store/client.rb:273:in `deserialize'
/Users/arisxama/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/active_event_store-1.0.2/lib/active_event_store/subscriber_job.rb:42:in `perform'
...
...
2023-08-18T12:07:51.359Z pid=34729 tid=4b6t class=OnHubCompanyUpdated::SyncCompany::SubscriberJob jid=76a3177eb4a9071d664c81b1 elapsed=185.342 INFO: fail
from active_event_store.
The problem is this part of code here
# .rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/active_event_store-1.0.2/lib/active_event_store/subscriber_job.rb#41
event = event_store.deserialize(**payload, serializer: ActiveEventStore.config.serializer)
Payload from Rails Event Store 2.11.1 is
{"event_id"=>"7eac442a-6966-4241-a33f-419dd82f3a50",
"data"=>"\"{\\\"company_guid\\\":\\\"UUID\\\"}\"",
"metadata"=>"\"{\\\"timestamp\\\":\\\"2023-08-18 12:58:27 UTC\\\",\\\"valid_at\\\":\\\"2023-08-18 12:58:27 UTC\\\",\\\"correlation_id\\\":\\\"1a56cc7f-fa95-47d7-96bb-36db02bd8181\\\"}\"",
"event_type"=>"hub_company_updated",
"timestamp"=>"2023-08-18T12:58:27.114715Z",
"valid_at"=>"2023-08-18T12:58:27.114715Z"}
while Payload from Rails Event Store 2.1 was
{:event_id=>"7eac442a-6966-4241-a33f-419dd82f3a50",
:data=>"\"{\\\"company_guid\\\":\\\"UUID\\\"}\"",
:metadata=>"\"{\\\"timestamp\\\":\\\"2023-08-18 12:58:27 UTC\\\",\\\"valid_at\\\":\\\"2023-08-18 12:58:27 UTC\\\",\\\"correlation_id\\\":\\\"1a56cc7f-fa95-47d7-96bb-36db02bd8181\\\"}\"",
:event_type=>"hub_company_updated",
:timestamp=>"2023-08-18T12:58:27.114715Z",
:valid_at=>"2023-08-18T12:58:27.114715Z"}
due to this part of code that changed in Rails Event Store gem
# .rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rails_event_store-2.11.1/lib/rails_event_store/active_job_scheduler.rb#12
klass.perform_later(record.serialize(serializer).to_h.transform_keys(&:to_s))
# .rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rails_event_store-2.1.0/lib/rails_event_store/active_job_scheduler.rb#12
klass.perform_later(record.serialize(serializer).to_h)
from active_event_store.
Fixed and released in 1.1.0.
from active_event_store.
Related Issues (10)
- Any plans to support weak/hybrid schemas? HOT 3
- Support different event store engines HOT 1
- have_published_event matcher. HOT 1
- RailsEventStore::Browser doesn't work out of the box HOT 1
- Following the documentation for subscribing to events causing duplicate subscriptions on code reload HOT 1
- Fix upstream RES compatibility HOT 7
- ActiveSupport.on_load not being called HOT 2
- Parse timestamp/valid_at as TimeWithZone in Mapper HOT 7
- It is currently not possible to use classes that inherit from `Class` as async subscribers. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from active_event_store.