Thinkcode.RabbitMQ.OpenAPI.Api.PubSubApi
May 13, 2019 ยท View on GitHub
All URIs are relative to http://mb1.bus.adaptive.me/rabbitmq/api
| Method | HTTP request | Description |
|---|---|---|
| ConsumeMessage | POST /queues/{vhost}/{queue}/get | Consume Message |
| PublishMessage | POST /exchanges/{vhost}/{exchange}/publish | Publish 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
| Name | Type | Description | Notes |
|---|---|---|---|
| vhost | string | ||
| queue | string | ||
| body | ConsumeRequest | [optional] |
Return type
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| vhost | string | ||
| exchange | string | ||
| body | PublishRequest | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]