WHAT'S NEW?
Loading...

JustSaying - talking with queues

Index

  • Intro
  • Some prep
  • References
  • Messages
  • Subscriber
  • Publisher
  • Configuration
  • Others
  • Final gift

Intro

JustSaying is a light-weight service bus on top of AWS (nugget) created by the guys from JustEat. It is used to communicate with AWS queues. You can subscribe to a queue or publish into SNS (push notifications) in just a few lines of code.
Recently v4 has been released with cool new features like asynchronous message handlers and many more.

Some prep

To start working with AWS I recommend you to install the AWS developer tools and configure it with your credentials. These are defined in AWS as a token and a secret key. You can place these credentials in your app/web.config file, system environmental variables, in your console, in a file defined in a particular folder or even in your machine.config file.


Messages

This entities represent the unit of work (POCO) for JustSaying. You can define your own entities inheriting the Message class as displayed here:

Subscriber

Now let's subscribe to a queue. This is step and the publish registration can be done in the same place in your application.



Publisher

Now it's time to tell JustSaying which messages we want to publish. The topic is defined in the message name:

Configuration


At this step, we can define how our handlers will manage the messages from the queues. In this example, we keep message to the default life time, 1 minute. After that time, if no handler take care of the message, it will be throw away (not really, it will be keep in an 'error' queue). We are telling 'OrderFailed' to keep messages for 5 min. and not handle them again on failure for 60 seconds.


Others


There are more stuff we can configure here, for example we can define a throttling mechanism to define a limit in the way JustSaying processed messages.

By default, error when handling messages are stored in separate queues, typically named the same
with a "-error" suffix. You can opt out this configuration if you don't want to take care of those errors.

In case you want to intercept any error from the handler when processing messages you can pass an Action into the "OnError" event within the ConfigureSubscriptionWith() fluent method:


Final gift

Finally, before leaving you in peace, I have a present for you with the following post from Just Eat technology blog:

http://tech.just-eat.com/2014/07/24/opensourced-justsaying-aws-messagebus/

Enjoy and keep coding!

References

http://www.just-eat.com/
https://github.com/justeat/JustSaying
https://www.nuget.org/packages/JustSaying/

Implementing cloud desing patterns for AWS

Index

  • Apologize
  • Intro
  • Design patterns


Apologize

I know I know... It's been a while without posting anything here, but it was for a good reason. I change my job more than a month ago and that (plus other things) got me entertained for some time. Apart I'm working on a personal project which takes most of my time but I promise I'll be back again really soon. Promised!

Intro

As I said before, I'm working in a new place and Amazon Web Services is heavy here. My aim is to post more about this wonderful service. A part from AWS, I'm also evaluating other PAAS providers like Heroku so you will find posts about this too.

Design patterns

I want to use this post as an index for some of the most important patterns defined in this book:

Please see here the complete list with some links to the ones I consider more useful:
  1. Basic patterns
  2. Patterns for high availability
  3. Patterns for processing static data
  4. Patterns for processing dynamic data
  5. Patterns for uploading data
  6. Patterns for databases
  7. Patterns for data processing
  8. Patterns for operation and maintenance
  9. Patterns for networking
 
That's all for today, I wish you the best guys and stay tuned!