Separated parameters for message body & message properties #9

Merged
merged 1 commit into from Dec 28, 2012

2 participants

@EvanK

This introduces some minor backward compatibility breaks, but in my opinion the bc break is worth the perceived improvement in usability. The bc break, however, would probably make bumping the version

Notes:

  • Explicitly casting body to string in IronMQ_Message#setBody. Alternatively could json_encode message bodies before posting and json_decode after getting, which would allow & preserve most non-string and even non-scalar typed data.
  • Changes to IronMQ#postMessages allows the posting of multiple message bodies with identical message properties applied to each. This seemed to me a value-added feature, but one could just as easily accept an array of properties arrays to instead preserve the original behavior.
@EvanK EvanK Separated parameters for message body & message properties in `IronMQ…
…_Message`, `IronMQ#postMessage` and `IronMQ#postMessages`

Notes:

* explicitly casting body to string in `IronMQ_Message#setBody`, fixes any issues regarding scalar non-string message bodies (eg, ints or floats)
* changes to `IronMQ#postMessages` allows multiple messages to be set with identical properties for each message w/o duplicating properties f/ each message
5c8019f
@thousandsofthem thousandsofthem merged commit 54ba0c4 into iron-io:master Dec 28, 2012
@thousandsofthem
Iron.io member

Sorry for extremely long delay. New syntax totally reasonable and handy, thanks!

@EvanK

Always happy to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment