Hi Asitha, Won't there be situations where we need to bind a queue with more than one exchange? If so, is it possible to handle such scenario using the proposed API?
Thanks, On Wed, Jan 10, 2018 at 5:40 PM, Asitha Nanayakkara <[email protected]> wrote: > Adding Harshak, Sanjeewa and Malinthaa > > On Wed, Jan 10, 2018 at 5:37 PM, Asitha Nanayakkara <[email protected]> > wrote: > >> Hi all, >> >> In the new message broker implementation we are implementing broker >> semantics based on AMQP 0.9.1 specification. >> >> From an administrative operations perspective, we have identified >> following resources to be exposed through restful web services. >> >> - exchanges >> - queues >> - topics >> - consumers >> >> There are currently two types of exchange. Namely, >> >> - direct exchange - relates to mostly known queue scenarios >> - topic exchange - relates to topic scenarios (pub-sub pattern) >> >> >> *Queues and topics* >> >> Within the broker, there are only queues. These queues are bound to >> direct and topic exchanges. Depending on the bound exchange we perceive >> them as either pub-sub pattern or queue pattern. >> Therefore within the Admin API's we refer to either a queue or a topic as >> a *destination.* >> >> >> *Consumers* >> >> For each internal queue (a destination) there will be consumers. Messages >> are delivered to consumers in round robin manner. >> >> In topic scenario (pub-sub pattern) topic exchange will bind a separate >> queue (a destination) per each consumer with the same topic name. When a >> message is published it will get delivered to the set of queues with the >> matching topic and then to the relevant consumers on those queues >> >> Considering the above broker semantics we have come up with the following >> Admin API design for the broker >> >> >> Base path /broker/v.1.0 >> >> >> >> >> >> >> >> *Exchanges* >> *Method* >> *Path* >> *Payload* >> 1 Create Exchange POST /exchanges { "name": "exchangeName", "type": >> "amq.direct", "durable": true } >> 2 Get All exchanges GET /exchanges >> 3 Get Exchange GET /exchanges/{exchangeName} >> 4 Delete Exchange DELETE /exchanges/{exchangeName} >> >> >> >> >> >> >> *Destinations (Queues/Topics)* >> >> >> 5 Create Queue/Topic POST /exchanges/{exchangeName}/destinations { >> "name": "queueName", "durable": true, "autoDelete": false } >> 6 List Queues/Topics GET /exchanges/{exchangeName}/destinations >> 7 Get Queue Details GET /exchanges/{exchangeName}/dest >> inations/{destinationName} >> 8 Delete Queue DELETE /exchanges/{exchangeName}/dest >> inations/{destinationName} >> >> >> >> >> >> >> *Consumers (for a queue or topic)* >> >> >> 9 List subscriptions for a destination GET /exchanges/{exchangeName}/dest >> inations/{destinationName}/consumers >> 10 Get subscriber details GET /exchanges/{exchangeName}/dest >> inations/{destinationName}/consumers/{consumerTag} >> 11 Close subscriber DELETE /exchanges/{exchangeName}/dest >> inations/{destinationName}/consumers/{consumerTag} >> >> >> >> >> >> >> When retrieving a set of exchanges, destinations or consumers we will be >> able to filter the result set by way of using query parameters. >> >> Regards, >> Asitha >> >> -- >> *Asitha Nanayakkara* <http://asitha.github.io/> >> Associate Technical Lead >> WSO2, Inc. <http://wso2.com/> >> Mob: +94 77 853 0682 <+94%2077%20853%200682> >> [image: https://wso2.com/signature] <https://wso2.com/signature> >> >> > > > -- > *Asitha Nanayakkara* <http://asitha.github.io/> > Associate Technical Lead > WSO2, Inc. <http://wso2.com/> > Mob: +94 77 853 0682 <+94%2077%20853%200682> > [image: https://wso2.com/signature] <https://wso2.com/signature> > > > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- *Eranda Rajapakshe* Software Engineer WSO2 Inc. Mobile : +94784822608
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
