1 Star 0 Fork 0

窦春荣 / pulsar-admin-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
PersistentTopicApi.md 47.82 KB
一键复制 编辑 原始数据 按行查看 历史
douchunrong 提交于 2021-09-18 11:34 . first commit

\PersistentTopicApi

All URIs are relative to http://localhost/admin/v2

Method HTTP request Description
Compact Put /persistent/{tenant}/{namespace}/{topic}/compaction Trigger a compaction operation on a topic.
CompactionStatus Get /persistent/{tenant}/{namespace}/{topic}/compaction Get the status of a compaction operation for a topic.
CreateNonPartitionedTopic Put /persistent/{tenant}/{namespace}/{topic} Create a non-partitioned topic.
CreatePartitionedTopic Put /persistent/{tenant}/{namespace}/{topic}/partitions Create a partitioned topic.
CreateSubscription Put /persistent/{tenant}/{namespace}/{topic}/subscription/{subscriptionName} Reset subscription to message position closest to given position.
DeletePartitionedTopic Delete /persistent/{tenant}/{namespace}/{topic}/partitions Delete a partitioned topic.
DeleteSubscription Delete /persistent/{tenant}/{namespace}/{topic}/subscription/{subName} Delete a subscription.
DeleteTopic Delete /persistent/{tenant}/{namespace}/{topic} Delete a topic.
ExpireMessagesForAllSubscriptions Post /persistent/{tenant}/{namespace}/{topic}/all_subscription/expireMessages/{expireTimeInSeconds} Expiry messages on all subscriptions of topic.
ExpireTopicMessages Post /persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/expireMessages/{expireTimeInSeconds} Expiry messages on a topic subscription.
GetBacklog Get /persistent/{tenant}/{namespace}/{topic}/backlog Get estimated backlog for offline topic.
GetInternalStats Get /persistent/{tenant}/{namespace}/{topic}/internalStats Get the internal stats for the topic.
GetLastMessageId Get /persistent/{tenant}/{namespace}/{topic}/lastMessageId Return the last commit message id of topic
GetList Get /persistent/{tenant}/{namespace} Get the list of topics under a namespace.
GetManagedLedgerInfo Get /persistent/{tenant}/{namespace}/{topic}/internal-info Get the internal stats for the topic.
GetPartitionedMetadata Get /persistent/{tenant}/{namespace}/{topic}/partitions Get partitioned topic metadata.
GetPartitionedStats Get /persistent/{tenant}/{namespace}/{topic}/partitioned-stats Get the stats for the partitioned topic.
GetPartitionedTopicList Get /persistent/{tenant}/{namespace}/partitioned Get the list of partitioned topics under a namespace.
GetPermissionsOnTopic Get /persistent/{tenant}/{namespace}/{topic}/permissions Get permissions on a topic.
GetStats Get /persistent/{tenant}/{namespace}/{topic}/stats Get the stats for the topic.
GetSubscriptions Get /persistent/{tenant}/{namespace}/{topic}/subscriptions Get the list of persistent subscriptions for a given topic.
GrantPermissionsOnTopic Post /persistent/{tenant}/{namespace}/{topic}/permissions/{role} Grant a new permission to a role on a single topic.
OffloadStatus Get /persistent/{tenant}/{namespace}/{topic}/offload Offload a prefix of a topic to long term storage
PeekNthMessage Get /persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/position/{messagePosition} Peek nth message on a topic subscription.
ResetCursor Post /persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/resetcursor/{timestamp} Reset subscription to message position closest to absolute timestamp (in ms).
ResetCursorOnPosition Post /persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/resetcursor Reset subscription to message position closest to given position.
RevokePermissionsOnTopic Delete /persistent/{tenant}/{namespace}/{topic}/permissions/{role} Revoke permissions on a topic.
SkipAllMessages Post /persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/skip_all Skip all messages on a topic subscription.
SkipMessages Post /persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/skip/{numMessages} Skipping messages on a topic subscription.
Terminate Post /persistent/{tenant}/{namespace}/{topic}/terminate Terminate a topic. A topic that is terminated will not accept any more messages to be published and will let consumer to drain existing messages in backlog
TriggerOffload Put /persistent/{tenant}/{namespace}/{topic}/offload Offload a prefix of a topic to long term storage
UnloadTopic Put /persistent/{tenant}/{namespace}/{topic}/unload Unload a topic
UpdatePartitionedTopic Post /persistent/{tenant}/{namespace}/{topic}/partitions Increment partitons of an existing partitioned topic.

Compact

Compact(ctx, tenant, namespace, topic, optional) Trigger a compaction operation on a topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *CompactOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CompactOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

CompactionStatus

LongRunningProcessStatus CompactionStatus(ctx, tenant, namespace, topic, optional) Get the status of a compaction operation for a topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *CompactionStatusOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CompactionStatusOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

LongRunningProcessStatus

Authorization

No authorization required

HTTP request headers

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

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

CreateNonPartitionedTopic

CreateNonPartitionedTopic(ctx, tenant, namespace, topic, optional) Create a non-partitioned topic.

This is the only REST endpoint from which non-partitioned topics could be created.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *CreateNonPartitionedTopicOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CreateNonPartitionedTopicOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

CreatePartitionedTopic

CreatePartitionedTopic(ctx, tenant, namespace, topic, body) Create a partitioned topic.

It needs to be called before creating a producer on a partitioned topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
body int32 The number of partitions for the topic

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

CreateSubscription

CreateSubscription(ctx, tenant, namespace, topic, subscriptionName, optional) Reset subscription to message position closest to given position.

Creates a subscription on the topic at the specified message id

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
subscriptionName string Subscription to create position on
optional *CreateSubscriptionOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CreateSubscriptionOpts struct

Name Type Description Notes

authoritative | optional.Bool| messageId where to create the subscription. It can be 'latest', 'earliest' or (ledgerId:entryId) | [default to false] replicated | optional.Bool| Is authentication required to perform this operation |

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

DeletePartitionedTopic

DeletePartitionedTopic(ctx, tenant, namespace, topic, optional) Delete a partitioned topic.

It will also delete all the partitions of the topic if it exists.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *DeletePartitionedTopicOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a DeletePartitionedTopicOpts struct

Name Type Description Notes

force | optional.Bool| Stop all producer/consumer/replicator and delete topic forcefully | [default to false] authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

DeleteSubscription

DeleteSubscription(ctx, tenant, namespace, topic, subName, optional) Delete a subscription.

There should not be any active consumers on the subscription.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
subName string Subscription to be deleted
optional *DeleteSubscriptionOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a DeleteSubscriptionOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

DeleteTopic

DeleteTopic(ctx, tenant, namespace, topic, optional) Delete a topic.

The topic cannot be deleted if delete is not forcefully and there's any active subscription or producer connected to the it. Force delete ignores connected clients and deletes topic by explicitly closing them.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *DeleteTopicOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a DeleteTopicOpts struct

Name Type Description Notes

force | optional.Bool| Stop all producer/consumer/replicator and delete topic forcefully | [default to false] authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

ExpireMessagesForAllSubscriptions

ExpireMessagesForAllSubscriptions(ctx, tenant, namespace, topic, expireTimeInSeconds, optional) Expiry messages on all subscriptions of topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
expireTimeInSeconds int32 Expires beyond the specified number of seconds [default to 0]
optional *ExpireMessagesForAllSubscriptionsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ExpireMessagesForAllSubscriptionsOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

ExpireTopicMessages

ExpireTopicMessages(ctx, tenant, namespace, topic, subName, expireTimeInSeconds, optional) Expiry messages on a topic subscription.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
subName string Subscription to be Expiry messages on
expireTimeInSeconds int32 Expires beyond the specified number of seconds [default to 0]
optional *ExpireTopicMessagesOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ExpireTopicMessagesOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetBacklog

PersistentOfflineTopicStats GetBacklog(ctx, tenant, namespace, topic, optional) Get estimated backlog for offline topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *GetBacklogOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetBacklogOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

PersistentOfflineTopicStats

Authorization

No authorization required

HTTP request headers

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

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

GetInternalStats

PersistentTopicInternalStats GetInternalStats(ctx, tenant, namespace, topic, optional) Get the internal stats for the topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *GetInternalStatsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetInternalStatsOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

PersistentTopicInternalStats

Authorization

No authorization required

HTTP request headers

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

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

GetLastMessageId

map[string]interface{} GetLastMessageId(ctx, tenant, namespace, topic, optional) Return the last commit message id of topic

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *GetLastMessageIdOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetLastMessageIdOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

map[string]interface{}

Authorization

No authorization required

HTTP request headers

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

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

GetList

[]string GetList(ctx, tenant, namespace) Get the list of topics under a namespace.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace

Return type

[]string

Authorization

No authorization required

HTTP request headers

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

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

GetManagedLedgerInfo

GetManagedLedgerInfo(ctx, tenant, namespace, topic) Get the internal stats for the topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetPartitionedMetadata

PartitionedTopicMetadata GetPartitionedMetadata(ctx, tenant, namespace, topic, optional) Get partitioned topic metadata.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *GetPartitionedMetadataOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetPartitionedMetadataOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

PartitionedTopicMetadata

Authorization

No authorization required

HTTP request headers

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

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

GetPartitionedStats

GetPartitionedStats(ctx, tenant, namespace, topic, optional) Get the stats for the partitioned topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *GetPartitionedStatsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetPartitionedStatsOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetPartitionedTopicList

[]string GetPartitionedTopicList(ctx, tenant, namespace) Get the list of partitioned topics under a namespace.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace

Return type

[]string

Authorization

No authorization required

HTTP request headers

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

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

GetPermissionsOnTopic

map[string]map[string]interface{} GetPermissionsOnTopic(ctx, tenant, namespace, topic) Get permissions on a topic.

Retrieve the effective permissions for a topic. These permissions are defined by the permissions set at thenamespace level combined (union) with any eventual specific permission set on the topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name

Return type

map[string]map[string]interface{}

Authorization

No authorization required

HTTP request headers

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

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

GetStats

TopicStats GetStats(ctx, tenant, namespace, topic, optional) Get the stats for the topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *GetStatsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetStatsOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

TopicStats

Authorization

No authorization required

HTTP request headers

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

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

GetSubscriptions

[]map[string]interface{} GetSubscriptions(ctx, tenant, namespace, topic, optional) Get the list of persistent subscriptions for a given topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *GetSubscriptionsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetSubscriptionsOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

[]map[string]interface{}

Authorization

No authorization required

HTTP request headers

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

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

GrantPermissionsOnTopic

GrantPermissionsOnTopic(ctx, tenant, namespace, topic, role, optional) Grant a new permission to a role on a single topic.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
role string Client role to which grant permissions
optional *GrantPermissionsOnTopicOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GrantPermissionsOnTopicOpts struct

Name Type Description Notes

body | optional.Interface of []string| Actions to be granted (produce,functions,consume) |

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

OffloadStatus

OffloadProcessStatus OffloadStatus(ctx, tenant, namespace, topic, optional) Offload a prefix of a topic to long term storage

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *OffloadStatusOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a OffloadStatusOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

OffloadProcessStatus

Authorization

No authorization required

HTTP request headers

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

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

PeekNthMessage

PeekNthMessage(ctx, tenant, namespace, topic, subName, messagePosition, optional) Peek nth message on a topic subscription.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
subName string Subscribed message expired
messagePosition int32 The number of messages (default 1) [default to 1]
optional *PeekNthMessageOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a PeekNthMessageOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

ResetCursor

ResetCursor(ctx, tenant, namespace, topic, subName, timestamp, optional) Reset subscription to message position closest to absolute timestamp (in ms).

It fence cursor and disconnects all active consumers before reseting cursor.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
subName string Subscription to reset position on
timestamp int64 time in minutes to reset back to (or minutes, hours,days,weeks eg:100m, 3h, 2d, 5w)
optional *ResetCursorOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ResetCursorOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

ResetCursorOnPosition

ResetCursorOnPosition(ctx, tenant, namespace, topic, subName, optional) Reset subscription to message position closest to given position.

It fence cursor and disconnects all active consumers before reseting cursor.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
subName string Subscription to reset position on
optional *ResetCursorOnPositionOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ResetCursorOnPositionOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false] messageId | optional.Interface of MessageIdImpl| messageId to reset back to (ledgerId:entryId) |

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

RevokePermissionsOnTopic

RevokePermissionsOnTopic(ctx, tenant, namespace, topic, role) Revoke permissions on a topic.

Revoke permissions to a role on a single topic. If the permission was not set at the topiclevel, but rather at the namespace level, this operation will return an error (HTTP status code 412).

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
role string Client role to which grant permissions

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

SkipAllMessages

SkipAllMessages(ctx, tenant, namespace, topic, subName, optional) Skip all messages on a topic subscription.

Completely clears the backlog on the subscription.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
subName string Name of subscription
optional *SkipAllMessagesOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a SkipAllMessagesOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

SkipMessages

SkipMessages(ctx, tenant, namespace, topic, subName, numMessages, optional) Skipping messages on a topic subscription.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
subName string Name of subscription
numMessages int32 The number of messages to skip [default to 0]
optional *SkipMessagesOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a SkipMessagesOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

Terminate

map[string]interface{} Terminate(ctx, tenant, namespace, topic, optional) Terminate a topic. A topic that is terminated will not accept any more messages to be published and will let consumer to drain existing messages in backlog

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *TerminateOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a TerminateOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

map[string]interface{}

Authorization

No authorization required

HTTP request headers

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

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

TriggerOffload

TriggerOffload(ctx, tenant, namespace, topic, optional) Offload a prefix of a topic to long term storage

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *TriggerOffloadOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a TriggerOffloadOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

UnloadTopic

UnloadTopic(ctx, tenant, namespace, topic, optional) Unload a topic

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
optional *UnloadTopicOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a UnloadTopicOpts struct

Name Type Description Notes

authoritative | optional.Bool| Is authentication required to perform this operation | [default to false]

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

UpdatePartitionedTopic

UpdatePartitionedTopic(ctx, tenant, namespace, topic, body) Increment partitons of an existing partitioned topic.

It only increments partitions of existing non-global partitioned-topic

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tenant string Specify the tenant
namespace string Specify the namespace
topic string Specify topic name
body int32 The number of partitions for the topic

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

1
https://gitee.com/douchunrong/pulsar-admin-go.git
git@gitee.com:douchunrong/pulsar-admin-go.git
douchunrong
pulsar-admin-go
pulsar-admin-go
8dc8e08f1d52

搜索帮助