Comments (4)
Hi @rogerjaffe - I've been trying as much as I can to have postal's default bindings resolver to match the semantics in the AMQP spec (not because of any interoperability, but because I love the spec). The AMQP spec notes the following:
The routing key used for a topic exchange MUST consist of zero or more words delimited by dots. Each word may contain the letters A-Z and a-z and digits 0-9.
It is possible to customize the bindingsResolver by assigning your own:
postal.configuration.resolver = customResolver;
The resolve needs to implement a compare( binding, topic )
(that returns true
if there's a match, false
if not) and reset
method (reset is optional, IIRC).
The regex being built in the default resolver isn't currently set up to handle leading dashes - just curious, any particular constraint get thrown at you requiring a leading dash?
In the meantime, I'll try to evaluate if I want to munge that regex any. Curious if @dcneiner or @arobson have opinions here as well...
from postal.js.
I have been using Firebase as the DB backend and I was using the FB-generated key when adding new records as part of the message to let my app's view models know about the change in data. Those keys all start with a dash -- so a sample message would be something like 'data.students.-JBNFkdglaE9hS3Yn6Tt' and that's what was generating the problem. Thanks for letting me know how to customize it!
from postal.js.
@rogerjaffe Hopefully you've had some luck overriding the bindings resolver - if you need any help, let me know. Ideally, I'd like to keep the postal "core/default" resolver as-is, since the option to override with custom topic matching is available. Closing this issue for now - but if you need anything, don't hesitate to open a new one!
from postal.js.
No problem -- Thanks for the help!
RJ
On Fri, Jan 17, 2014 at 7:25 AM, Jim Cowart [email protected]:
@rogerjaffe https://github.com/rogerjaffe Hopefully you've had some
luck overriding the bindings resolver - if you need any help, let me know.
Ideally, I'd like to keep the postal "core/default" resolver as-is, since
the option to override with custom topic matching is available. Closing
this issue for now - but if you need anything, don't hesitate to open a new
one!—
Reply to this email directly or view it on GitHubhttps://github.com//issues/57#issuecomment-32614644
.
Roger Jaffe
Patrick Henry High School
[email protected]
858-876-4375
from postal.js.
Related Issues (20)
- How to publish data between Node.js modules? HOT 2
- Bower Release v2.0.5
- Competing consumers HOT 1
- Help improve the quality of the DefinitelyTyped (TypeScript) definitions
- postal.preserve: Still taking a ConduitJS dependency HOT 2
- Default Subscriber
- Stack overflow in IE 11 when publish called on channel with many pending unsubscribes
- Shouldn't postal.channel() implement the Singleton pattern? HOT 2
- Subscriber callback method can brake calling other subscribers HOT 1
- Devtools extension for Chrome
- Messages published inside a subscriber won't be passed to uncached subscribers
- why cache only for result === true
- postal.lodash.js Error: Module name "lodash/after" has not been loaded
- Is this project still active? HOT 6
- Wait for messages to be delivered and processed in unit tests
- timeStamp in envelope should honor timezone
- Timestamp missing on wireTap envelopes
- Thank you
- Regarding publish and subscribe, Important question
- How does postal.js support replay?
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 postal.js.