Giter Site home page Giter Site logo

Comments (4)

ifandelse avatar ifandelse commented on July 18, 2024

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.

rogerjaffe avatar rogerjaffe commented on July 18, 2024

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.

ifandelse avatar ifandelse commented on July 18, 2024

@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.

rogerjaffe avatar rogerjaffe commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.