Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 21a9a95

Browse files
committed
Update to There's a Rails' convention...
1 parent a1ca988 commit 21a9a95

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

_posts/2015-04-25-theres-a-rails-convention-on-naming-event-streams.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,17 @@ create_instance.provisioning
4040
add_shh_key_to_instance.provisioning
4141
```
4242

43-
Mucha better!
43+
Mucha better!
44+
45+
===
46+
47+
**Update**:
48+
49+
After a long shower (the only place and time where/when I actually think), I figured out:
50+
51+
3. the Rails convention has nothing to do with naming the event following this format: `action_on_things`
52+
4. `event.library` is still a mystery to me. Given Rails structures resource operations after `Resource#action`, I'm dying to know why they're doing events this way
53+
54+
### `action_on_things`
55+
56+
This works well in the Rails context, where you can select queues using regex with `ActiveSupport::Notification.subscribe` and do (allthenastythings) with those messages in one `subscribe` block. For external queues, I can't imagime myself going through a list of topics to fetch all the relevant messages; not to mention, this's ensured to be horrific with operations that need to be FIFO.

0 commit comments

Comments
 (0)