Thinkcode.RabbitMQ.OpenAPI.Api.PubSubApi

May 13, 2019 ยท View on GitHub

All URIs are relative to http://mb1.bus.adaptive.me/rabbitmq/api

MethodHTTP requestDescription
ConsumeMessagePOST /queues/{vhost}/{queue}/getConsume Message
PublishMessagePOST /exchanges/{vhost}/{exchange}/publishPublish Message

ConsumeMessage

List ConsumeMessage (string vhost, string queue, ConsumeRequest body = null)

Consume Message

Example

using System;
using System.Diagnostics;
using Thinkcode.RabbitMQ.OpenAPI.Api;
using Thinkcode.RabbitMQ.OpenAPI.Client;
using Thinkcode.RabbitMQ.OpenAPI.Model;

namespace Example
{
    public class ConsumeMessageExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basic_auth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new PubSubApi();
            var vhost = vhost_example;  // string | 
            var queue = queue_example;  // string | 
            var body = new ConsumeRequest(); // ConsumeRequest |  (optional) 

            try
            {
                // Consume Message
                List<ConsumeResponse> result = apiInstance.ConsumeMessage(vhost, queue, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PubSubApi.ConsumeMessage: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
vhoststring
queuestring
bodyConsumeRequest[optional]

Return type

List

Authorization

basic_auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PublishMessage

PublishResponse PublishMessage (string vhost, string exchange, PublishRequest body = null)

Publish Message

Example

using System;
using System.Diagnostics;
using Thinkcode.RabbitMQ.OpenAPI.Api;
using Thinkcode.RabbitMQ.OpenAPI.Client;
using Thinkcode.RabbitMQ.OpenAPI.Model;

namespace Example
{
    public class PublishMessageExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basic_auth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new PubSubApi();
            var vhost = vhost_example;  // string | 
            var exchange = exchange_example;  // string | 
            var body = new PublishRequest(); // PublishRequest |  (optional) 

            try
            {
                // Publish Message
                PublishResponse result = apiInstance.PublishMessage(vhost, exchange, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PubSubApi.PublishMessage: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
vhoststring
exchangestring
bodyPublishRequest[optional]

Return type

PublishResponse

Authorization

basic_auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]