Skip to main content

AMQ Online 101 - What I've learnt from recent AMQ Online Hackfest

AMQ Online, project name, EnMasse. Recently, I've attended AMQ Online Hackfest where the Rob and Ulf the engineering team kindly ask us to take a hack on the new platform. If you don't know what AMQ Online is, it's basically an online self-service (Messaging as a Service) messaging platform for developers/application owners to quickly spin up their own queue and topic without worrying about the scalability, network setting and all sorts of operation setups.

Watch this quick video overview on what is AMQ Online:

Before the hack, they went through the basics of AMQ Online, and here is my take on explaining the basics of AMQ Online. With AMQ Online being the platform to service users, there are obviously two main area of focus for people depending on their roles.  The administration side to spin up and manage the platform, the other side of course is the user end, where they will be requesting for the message services.

Admin does the installation of the platform foundation on OpenShift, they install all the basic elements that controls all the needed brokers, routers, user console and monitoring tools, and also takes care of setting up the authentication and authorization of who has access to the platform. We don't always have unlimited computing resource for all users, admin also has control over the resource limitation and create different plans that can apply to accompany different needs from users.

Each user will be assign to an "Address Space", each Address Space will have separate sets of brokers, router and console for it, and later on when user comes in to ask for queue and topics, they will be running on top of these set of brokers and routers. Admins does not create the actual "Address Space", their job is to create PLANs that specify the limits, configuration. So when a new user comes in, they can then create the "Address Space" base on the plans.

There are several plans that can be defined.

  • Infrastructure configuration - as name suggested, it configures the hardware resource allocated to the components, such as CPU. memory, storage of console, broker and router, also some other specific config too.
  • Address Space Plan - basically the main quota control, it knows how much hardware can be used by referring to infrastructure configuration, as well as controls the number of routers/brokers in the system. And so what are the queue/topic plans are available in the address space. 
  • Address Plan - Address plan defines the consumption of resource base on the percentage. The sum of number of brokers/routers of the entire address space will determine how many instance of broker and router will be running in the name space. 

Tenants are the users of the platform, they will be creating "Address Space", and create destinations by applying the plans on top of it.  After the queue and topics are created, the tenants can go ahead and create credentials maps to different access roles, they can decide what account has access to admin console, which account has consume/produce right to any addresses(queues/ topics) in the Address Space. Please note, tenants will have no visibility to queue or topics of other Address Space, unless specially specified. Once the address are created and config correctly, application will be able to use the credential to read/write to the messaging address.

These are the three things tenants need to create

  • Address Space - refer back to Address Space Plan and create and config pod base on the plan selected. 
  • Address - the destination create for user access. Maps to address plan. 
  • Message User - defines the authentication method for destination access, and the authorization of destinations to this user. 

Watch this video on AMQ Online 101:

There are different types of Address Space, Address.. and other configs available. I want to keep this post as simple and basic as possible, please read into the documentation for more details. I might go over in next post, if I ever get some spare time to do it :) Till next time! Enjoy.


Popular posts from this blog

Red Hat Fuse - Announcing Fuse 7 Tech preview 3 release.

Red Hat Fuse 7.0 technical preview three is out today! On the pathway to become one of the best cloud-native integration platform, Fuse gives developer freedom to choose how they want to develop the integration solution, where they want to deploy it and capabilities to address new integration personas that do not have development experience.
By supporting the three major runtime, developer is free to work on the runtime of their choice.By supporting standalone and cloud deployment, it simplifies the complexity to distinguish between these environments, allowing application to deploy freely among the environment of your choice. All levels of developers are welcome, you can either dive deep into creating customize complex integration logic, or using the new low code platform to quickly build a simple integration. In this Tech Preview release you get it all.
Fuse StandaloneSpring-boot for microserviceKaraf 4 for OSGi loverJBoss EAP for JavaEE developersFuse on OpenShiftPlugins for easy co…

JBoss EAP 6 - 效能調校 (一) DataSource 的 Connection Pool

效能沒有什麼Best Practice, 反正能調整的就那些。 通常,一個程式的效能大概有70-80% 都跟程式怎麼寫的其實比較有關係。

最近我最疼愛的小貓Puji 因為膀胱結石開刀的時候過世了,心情很差請原諒我的口氣沒有很好,也沒有心情寫部落格。

Puji R.I.P.



JBoss 的 SubsystemDatasource WebWeb Service EJB Hibernate JMSJCAJVM 調校OS (作業系統)

先來看一下 DataSource Subsystem, DataSource 的部分主要是針對Connection Pool 做調校。

通常,程式都會需要跟資料庫界接,電腦在本機,尤其是在記憶體的運算很快,但是一旦要外部的資源連接,就是會非常的耗資源。所以現在的應用程式伺服器都會有個Pool 放一些先連接好的 資料庫connection,當程式有需要的時候就可以馬上提供,而不用花那些多餘的資源去連接資料庫。

這就是為什麼要針對Connection Pool 去做調校。

以下會討論到的參數,都是跟效能比較有關係,Datasource 還有很多參數,像是檢核connection 是否正確的,我都不會提到。如果你追求的是非常快速的效能,那我建議你一個檢核都不要加。當然,這樣就會為伺服器上面執行的程式帶來風險。這就是你要在效能與正確,安全性上面的取捨了。 (套句我朋友說的話,不可能又要馬兒好,又要馬兒不吃草的..)

最重要的調校參數就是 Connection 的 Pool 數量。(也就是那個Pool 裡面要放幾條的connection.) 這個參數是每一個應用程式都不一樣的。


Connection Pool 最少會存留的connection 數量


Connection Pool 最多可以開啓的 connection 數量


事先將connection pool 裡面建立好min-pool-size 的connection.

我的建議是觀察一下平常程式要用到的量設定為 min-pool-size 。

JBoss Fuse - Fuse workshop 101 - Part One

On my way to Hong Kong for a day of workshop on JBoss Fuse, and as I go through my Slide deck, I cannot find any decent easy workshop for beginners. Therefore I decide make a workshop that is easy for Camel first timer to get their hands dirty.

The first of part of the workshop is an introduction to Camel, it first goes through what is exactly inside JBoss Fuse.

For part one of the workshop, it takes your through the very basic of Camel, one of the very important component inside JBoss Fuse.
Every Camel need to have a runtime container to run in, inside camel we call it a CAMEL CONTEXT.  Inside every Camel context, you can define lots of camel route and registry, don't worry about what those are, we will explain later.

So inside out blueprint xml, you will see a tag called camelContext.

Next up is camel route, they are a chain of command or process defined by you, as a developer.
Inside the camel route, there are consumer endpoints that listens to the incoming messages, producers …