Windows Mobile Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 2 August 2012

Service Bus Queues from Windows Azure - Introduction

Posted on 23:00 by Unknown
In the following post we will talk about Service Bus Queues. Basically, this type of service bus can help us to communicate between two separate types of modules. We can have one or more producers (modules that create messages) that send messages to service bus asynchronously. A receiver can handle each message that is send to the service bus.
Using Service Bus Queues we are ensure that each message that is send to the service bus will be available to the consumer. We don’t need to wait until the consumer process the message or to check if the message was lost in the process of sending the message to the consumer.
Another nice feature is the isolation that Service Bus Queues creates between the consumer and the producers. The consumer don’t need to know who send the message to the service bus, this is not relevant and important to him. Of course we can mark messages with the producer information. The same thing happens on the message senders. They don’t know about how will consume the message. They only know about the service bus. This type of communication is named brokered messaging communication.
As the name is saying, Service Bus Queues uses a collection similar to a queue to store the messages. Because of this the consumer will be able to receive the messages in the order that were sending to the queue (FIFO – first in, first out).
When you send or get a message to the queue, the operation has a transactional behavior and atomicity. What does means? When we are sending a message or we get one or more messages from the service bus, the infrastructure guaranty to us that no message will be lost during this process.
The maxim size of messages that are in Service Bus Queues can be 5GB. From what I saw, when you try to add messages to the service bus, when the maxim size was exceeded an error will be throw that can be handled in code. In this moment each message that is added to the queue not only need to be serializable, but also the size of the message need to be under than 256 KB. In the near future the size of a message will be 1 MB, but is nothing official.
If you use this kind of mechanism, you will have a mechanism that detects automatic duplicates. What does that duplicate messages can be removed automatically, without needing to check manually. Each message that is added to the service bus has a lifetime. We can send how long a message can exist in the service bus and when he will expire. This flag is called TTL (Time To Live) and the maxim value accepted is unlimited. When a message expired it is automatically removed from service bus. The default value is 60 seconds but can be changed every easily.
A producer or a consumer can add/get more than one message. Service Bus Queues support messages batches. For example a consumer can add 10 messages with only one request.
An interesting feature is the ability to change the delivery mechanism from a safe one to receive and delete pattern. This means that the message will be automatically delete from the Service Bus Queues without waiting the consumer to confirm that he received the message and process it. This can some costs.
Each message can have a delivery time property. In this way a message can be deliver to the consumer later on. It offers us the ability to schedule the messages – when the consumer will be able to receive them. On the consumer side, we have the long poling mechanism implemented. So we can pool for a message for a long time without any problems.
At the begging of the post I sad that we can have only one consumer. Basically we can have as many consumer we want, but only one of them we will receive a message. The same message will not be broadcast to all (for this functionality we can use Service Bus Topic. We can make a small hack to be able to specify on that consumer we want a message to be sent. By setting the SessionID property to a message only the specific consumers that listen to the given sessions will be able to receive that message. But be aware, broadcasting messages to more than one consumer is not possible using Service Bus Queues.
This kind of Service Bus can be very easily integrated with WCF. The maxim number “queues” in a Service Bus unit (service namespace) is 10.000, but if you want more, this limit can be increased. Theoretically, we can have an unlimited number of clients to a service bus. The only limit that exists is for TCP communication protocol that is set to 100.
In this moment we can communicate with Service Bus Queues in different ways. We have a lot of programing languages that are supported. The base communication is REST over HTTPS or TCP with TLS. Because of this we can find libraries that help us to use Service Bus Queues written in: .NET, PHP, Node.js and Java.
Let’s see what limitations we have on Service Bus Queues. First of all the latency is around 100ms and the maxim number of messages that can be sent are 2000. A queue name from service bus can have maximum 256 characters and of course we cannot have specials characters like @ or *. We can have only letters, numbers and ‘.’ ‘_’ ‘ ‘-’.
In this moment we don’t have any type of Shared Access Signature or public Service Bus Namespace. The authentication is made using:
  • Identify provider federation
  • Role based access control
  • ACS claims
We have three types of roles that are defined. A receiver that can consume a message. A sender that can only add a message but without consume any message from it and an admin. Than can add, get and iterate throw the queue (and delete of course).
In this post I presented some base concept of Service Bus Queues. In the next post I will show you how we can work with it.
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in service bus, Windows Azure | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Service Bus Topic - Automatic forward messages from a subscription to a topic
    Windows Azure Service Bus Topic is a service that enables us to distribute the same messages to different consumers without having to know e...
  • Patterns in Windows Azure Service Bus - Message Splitter Pattern
    In one of my post about Service Bus Topics from Windows Azure I told you that I will write about a post that describe how we can design an a...
  • CDN is not the only solution to improve the page speed - Reverse Caching Proxy
    I heard more and more often think like this: “If your website is to slow, you should use a CDN.” Great, CDN is THE solution for any kind of ...
  • E-Learning Vendors Attempt to Morph Mobile
    The sign should read: " Don't touch! Wet Paint !" I had a good chuckle today after receiving my latest emailed copy of the eLe...
  • Content Types - Level 6: Rich Media
    Level 6: Rich Media NOTE: This is part 7 of 7 and the conclusion of this continuing series; please see earlier posts for more background inf...
  • Publishing our CellCast Widget for iPad
    The rush has been on this week as our development team worked to design a new version of our CellCast Widget specifically for Apple's up...
  • Content Types - Level 5: Courseware
    Level 5: Content and Courseware NOTE: This is part 6 of 7 in a continuing series; please see earlier posts for more background information. ...
  • SQL - UNION and UNION ALL
    I think that all of us used until now UNION in a SQLstatement. Using this operator we can combine the result of 2 queries. For example we wa...
  • Cum sa salvezi un stream direct intr-un fisier
    Cred ca este a 2-a oara când întâlnesc aceasta cerința in decurs de câteva săptămâni. Se da un stream și o locație unde trebuie salvat, se c...
  • Content Types - Level 4: Reference
    Level 4: Reference Materials & Static Content NOTE: This is part 5 of 7 in a continuing series; please see earlier posts for more backgr...

Categories

  • .NET
  • .NET nice to have
  • #if DEBUG
  • 15 iunie 2011
  • 15 octombrie 2011
  • 2011
  • abstracta
  • action
  • adaugare
  • ajax
  • Amsterdam
  • Android
  • aplicatii
  • App Fabric
  • Apple iSlate
  • array
  • as
  • ASP.NET
  • AsReadOnly
  • Assembly comun
  • async
  • Asynchronous programming
  • asyncron
  • Autofac
  • AutoMapper
  • az
  • Azure
  • Azure AppFabric Cache
  • Azure backup solution
  • Azure Storage Explorer
  • azure. cloud
  • backup
  • BCP utility
  • bing maps v7
  • BitArray
  • BlackBerry
  • blob
  • BlobContainerPublicAccessType
  • breakpoint
  • bucuresti
  • C#
  • cache
  • CallerMemberName
  • CellCast
  • Certificate
  • CES
  • change
  • ChannelFactory
  • clasa
  • classinitialize
  • clean code
  • click event
  • close
  • Cloud
  • Cluj
  • cluj-napoca
  • Code contracts
  • code retrat
  • codecamp
  • CollectionAssert
  • Compact Edition
  • compara
  • Comparer T .Default
  • CompareTo
  • comparison
  • comunitate
  • concurs
  • Conditional attribute
  • configurare
  • connection string
  • container
  • content type
  • control
  • Convert
  • convertAll
  • convertor
  • cross platform
  • CRUD
  • css
  • custom properties
  • custom request
  • DACPAC
  • Daniel Andres
  • data sync service
  • database
  • date time
  • datetime
  • debug
  • default
  • delegate
  • dependency injection
  • deploy
  • DeploymentItem
  • design patterns
  • Dev de Amsterdam
  • development stoage
  • dictionary
  • diferente
  • digging
  • director
  • Directory.Exist
  • disable
  • dispatcher
  • dispose
  • dropdown
  • dynamic
  • EF
  • email
  • encoding
  • entity framework
  • enum
  • enumerable
  • Environment.NewLine
  • error
  • error 404
  • error handling
  • eveniment
  • event
  • ews
  • excel
  • exception
  • exchange
  • exita
  • explicit
  • export
  • extension
  • field
  • File.Exist
  • finalize
  • fire and forget
  • Fluent interface pattern
  • format
  • func
  • GC.SuppressFinalize
  • generic
  • getdirectoryname
  • globalization
  • gmail
  • hackathon
  • Hadoop
  • handle
  • HTML
  • html 5
  • Html.ActionLink
  • http://www.blogger.com/img/blank.gif
  • HttpModule
  • IComparable
  • IE
  • ienumerable
  • IIS
  • image
  • implicit
  • import
  • int
  • internationalization
  • Internet Explorer
  • interop
  • Ioc
  • IP Filter
  • iPhone
  • iQuest
  • IStructuralEquatable
  • ITCamp
  • itspark
  • java script
  • javascript
  • July 2012
  • KeyedByTypeCollection
  • KeyNotFoundException
  • Kinect SDK
  • lambda expression
  • LightSwitch Microsoft Silverlight
  • linq
  • list
  • lista
  • lista servicii
  • liste
  • Live Connect
  • Live ID
  • load
  • localization
  • lock
  • m-learning
  • MAC
  • Mango
  • map
  • mapare
  • mapare propietati
  • messagequeue
  • meta properties
  • method
  • MethodImpl
  • Metro App
  • Microsoft
  • Microsoft Sync Framework
  • mlearning
  • mlearning devices
  • Mobile Apps
  • mobile in the cloud
  • mobile learning
  • mobile services
  • Mobile Web
  • mongoDb
  • monitorizare
  • msmq
  • multitasking
  • MVC
  • MVC 3
  • MVVM
  • namespace
  • nextpartitionkey
  • nextrowkey
  • Ninject
  • nivel acces
  • no result
  • normalize
  • nosql
  • null expcetion
  • null object pattern
  • NullReferenceException
  • OAuth API
  • office
  • offline
  • Open ID
  • openhackeu2011
  • operations
  • operator
  • optimization
  • option
  • outputcache
  • OutputCacheProvider
  • override
  • paginare
  • pagination
  • path
  • persistare
  • Portable Library tool
  • Post event – CodeCamp Cluj-Napoca
  • predicate
  • predictions
  • prezentare
  • process
  • proiect
  • property
  • propietati
  • query
  • ReadOnlyCollection
  • ReadOnlyDictionary
  • referinta
  • reflection
  • remote
  • reply command
  • request
  • request response
  • resouce
  • REST
  • REST Client
  • RESTSharp
  • ronua
  • rss
  • rulare
  • salvare in fisier
  • sc
  • schimbare timp
  • select
  • select nodes
  • send
  • serializare
  • serialization
  • Server.Transfer. Resposen.Redirect
  • service bus
  • ServiceBase
  • servicecontroller
  • sesiune
  • session
  • Session_End
  • Session_Start
  • setup
  • Sibiu
  • signalR
  • Silverlight
  • sincronizare
  • Single Responsibility Principle
  • SkyDrive
  • skype
  • smartphones
  • smtp
  • Snapguide
  • sniffer
  • socket
  • solid
  • spec#
  • sql
  • Sql Azure
  • SQL CE
  • sql server 2008 RC
  • SRP
  • startuptype
  • stateful
  • stateless
  • static
  • stergere
  • store
  • store procedure
  • stream
  • string
  • string.join
  • struct
  • StructuralEqualityComparer
  • submit
  • switch
  • Symbian
  • Synchronized
  • system
  • tabele
  • table
  • techEd 2012
  • tempdata
  • test
  • testcleanup
  • testinitialize
  • testmethod
  • thread
  • timer
  • ToLower
  • tool
  • tostring
  • Total Cost Calculator
  • trace ASP.NET
  • transcoding
  • tuplu
  • tutorial
  • TWmLearning
  • type
  • unit test
  • unittest
  • UrlParameter.Optional
  • Validate
  • validation
  • verificare
  • video
  • view
  • ViewBag
  • virtual
  • visual studio
  • VM role
  • Vunvulea Radu
  • wallpaper
  • WCF
  • WebBrower
  • WebRequest
  • where clause
  • Windows
  • windows 8
  • Windows Azure
  • Windows Azure Service Management CmdLets
  • windows live messenger
  • Windows Mobile
  • Windows Phone
  • windows service
  • windows store application
  • Windows Task
  • WinRT
  • word
  • workaround
  • XBox
  • xml
  • xmlns
  • XNA
  • xpath
  • YMesseger
  • Yonder
  • Zip

Blog Archive

  • ►  2013 (139)
    • ►  November (17)
    • ►  October (12)
    • ►  September (10)
    • ►  August (7)
    • ►  July (8)
    • ►  June (15)
    • ►  May (12)
    • ►  April (17)
    • ►  March (16)
    • ►  February (9)
    • ►  January (16)
  • ▼  2012 (251)
    • ►  December (9)
    • ►  November (19)
    • ►  October (26)
    • ►  September (13)
    • ▼  August (35)
      • Service Bus Topic – How we can migrate from Servic...
      • Service Bus Topic - Different ways to create and m...
      • Service Bus Topics - Using with WCF services
      • Java Script code refactoring - hands on code
      • C# error at compile time challenge
      • Service Bus Topics - Limitations
      • Service Bus Topics - How to use it (part 2)
      • Service Bus Topics - How to use it (part 1)
      • Service Bus Topics - Overview
      • Where we can add resjson files in a Metro Application
      • Service Bus Queues blog post series – a comprehens...
      • Service Bus Queues from Windows Azure - Business ...
      • Service Bus Queues from Windows Azure - Integratio...
      • Service Bus Queues from Windows Azure - Scheduling
      • Promises and Asynchron calls in Metro Application ...
      • Service Bus Queues from Windows Azure - BrokeredMe...
      • Service Bus Queues from Windows Azure - How to ret...
      • Service Bus Queues from Windows Azure - Death lett...
      • Service Bus Queues vs Windows Azure Queues
      • Don't name your class "XXXManager"
      • Metro Apps on Window 8 - What to use? XAML/HTML? J...
      • Service Bus Queues from Windows Azure - How to sep...
      • Windows 8 Metro App - How to debug JS that was loa...
      • How to use Diagnostic Monitor on Windows Azure
      • Solution - A challenge with Promises from Java Script
      • Service Bus Queues from Windows Azure - How to ite...
      • A challenge with Promises from Java Script
      • Today Software Magazine – I had the honor to write...
      • How should we use Command/Query Segreration (part 2)
      • Service Bus Queues from Windows Azure - How to use it
      • How to define promises on Metro App for Windows 8 ...
      • How should we use Command/Query Segreration (part 1)
      • Service Bus Queues from Windows Azure - Introduction
      • Service Bus - Introduction to Service Bus of Windo...
      • Metro App - Call a Java Script method by name and ...
    • ►  July (28)
    • ►  June (27)
    • ►  May (24)
    • ►  April (18)
    • ►  March (17)
    • ►  February (20)
    • ►  January (15)
  • ►  2011 (127)
    • ►  December (11)
    • ►  November (20)
    • ►  October (8)
    • ►  September (8)
    • ►  August (8)
    • ►  July (10)
    • ►  June (5)
    • ►  May (8)
    • ►  April (9)
    • ►  March (14)
    • ►  February (20)
    • ►  January (6)
  • ►  2010 (26)
    • ►  December (1)
    • ►  November (1)
    • ►  October (1)
    • ►  June (2)
    • ►  May (1)
    • ►  April (4)
    • ►  March (1)
    • ►  February (1)
    • ►  January (14)
Powered by Blogger.

About Me

Unknown
View my complete profile