{"action":"closed","issue":{"url":"https://api.github.com/repos/rniemeyer/knockout-postbox/issues/32","labels_url":"https://api.github.com/repos/rniemeyer/knockout-postbox/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/rniemeyer/knockout-postbox/issues/32/comments","events_url":"https://api.github.com/repos/rniemeyer/knockout-postbox/issues/32/events","html_url":"https://github.com/rniemeyer/knockout-postbox/issues/32","id":58108517,"number":32,"title":"Subscription singular?","user":{"login":"jehendricks","id":1136049,"avatar_url":"https://avatars.githubusercontent.com/u/1136049?v=3","gravatar_id":"","url":"https://api.github.com/users/jehendricks","html_url":"https://github.com/jehendricks","followers_url":"https://api.github.com/users/jehendricks/followers","following_url":"https://api.github.com/users/jehendricks/following{/other_user}","gists_url":"https://api.github.com/users/jehendricks/gists{/gist_id}","starred_url":"https://api.github.com/users/jehendricks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jehendricks/subscriptions","organizations_url":"https://api.github.com/users/jehendricks/orgs","repos_url":"https://api.github.com/users/jehendricks/repos","events_url":"https://api.github.com/users/jehendricks/events{/privacy}","received_events_url":"https://api.github.com/users/jehendricks/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-02-18T18:36:05Z","updated_at":"2015-02-19T16:08:16Z","closed_at":"2015-02-19T16:08:16Z","body":"I'm using Knockout 3.2.0 with Postbox.0.4.2.  I'm fairly new to KO (month and half) but been a developer for many years and have been doing Angular for a year but looking for a simpler lower learning curve approach for my team.  I've decided on KO, Require, RSVP, and Postbox.  Since I'm coming at KO new with Components now a part of KO, I'm taking a very Component-centric approach since that makes templates simple html fragments and allows very nice code organization.  The problem of course is a clean inter-component messaging that is as loosely coupled as possible.  Postbox seemed to be the answer.  So that's my environment.\r\n\r\nThe first place the Postbox is used within my app is following login.  The login is a KO component for easy reuse across applications and therefore I don't want any tight coupling.  When login is complete, I have the login doing a ko.postbox.publish('logged in', myUserObject);  This then allows my application code to be unaware of the login component while able to be informed when login has been completed and what the authentication details are in the provided myUserObject message payload.\r\n\r\nHere's where there is confusion on my part.  I have 3 components and 1 service that subscribe to the 'logged in' message via ko.postbox.subscribe.  Each subscribe has it's own anonymous closure expecting myUserObject as the sole argument.  Only 1 subscriber is informed on the publish.  The informed subscriber is the first one subscribed.  If I comment it out, then the next subscriber get's the message.\r\n\r\nIs PostBox suppose to support multiple subscribers?  Is there something I'm suppose to be returning from the subscriber function to indicate continued delivery to other subscribers?\r\n\r\nI think PostBox is a fantastic idea, leveraging what is already there to add pubsub but it's currently frustrating me that I can't get it to work the way I need it to.  I really don't want to go to another pubsub solution because that would not leverage what is already available via KO.\r\n\r\nThanks for PostBox and I look forward to hearing what I may be doing wrong.  I can also provide code samples if that would help."}}