...

Source file src/solace.dev/go/messaging/messaging.go

Documentation: solace.dev/go/messaging

     1  // pubsubplus-go-client
     2  //
     3  // Copyright 2021-2025 Solace Corporation. All rights reserved.
     4  //
     5  // Licensed under the Apache License, Version 2.0 (the "License");
     6  // you may not use this file except in compliance with the License.
     7  // You may obtain a copy of the License at
     8  //
     9  // http://www.apache.org/licenses/LICENSE-2.0
    10  //
    11  // Unless required by applicable law or agreed to in writing, software
    12  // distributed under the License is distributed on an "AS IS" BASIS,
    13  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  // See the License for the specific language governing permissions and
    15  // limitations under the License.
    16  
    17  package messaging
    18  
    19  import (
    20  	"solace.dev/go/messaging/internal/impl"
    21  	"solace.dev/go/messaging/pkg/solace"
    22  	"solace.dev/go/messaging/pkg/solace/message/rgmid"
    23  )
    24  
    25  // NewMessagingServiceBuilder returns an instance of solace.MessagingServiceBuilder that can be used
    26  // to build a new solace.MessagingService.
    27  func NewMessagingServiceBuilder() solace.MessagingServiceBuilder {
    28  	return impl.NewMessagingServiceBuilder()
    29  }
    30  
    31  // ReplicationGroupMessageIDOf returns an instance of rmid.ReplicationGroupMessageID from the given
    32  // string that can be compared to a message's ReplicationGroupMessageID or used to start replay.
    33  // Replication Group Message IDs come in the form rmid1:xxxxx-xxxxxxxxxxx-xxxxxxxx-xxxxxxxx
    34  func ReplicationGroupMessageIDOf(rmidAsString string) (replicationGroupMessageID rgmid.ReplicationGroupMessageID, err error) {
    35  	return impl.ReplicationGroupMessageIDOf(rmidAsString)
    36  }
    37