1 // pubsubplus-go-client 2 // 3 // Copyright 2021-2024 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 config 18 19 // The various back pressure strategies that can be used to configure a receiver. 20 const ( 21 // ReceiverBackPressureStrategyDropLatest drops the newest incoming message when the receiver's 22 // buffer is full. 23 ReceiverBackPressureStrategyDropLatest = "BUFFER_DROP_LATEST_WHEN_FULL" 24 // ReceiverBackPressureStrategyDropOldest drops the oldest buffered message when the receiver's 25 // buffer is full. 26 ReceiverBackPressureStrategyDropOldest = "BUFFER_DROP_OLDEST_WHEN_FULL" 27 ) 28 29 // The various replay strategies available when configuring Replay on a PersistentMessageReceiver. 30 const ( 31 // PersistentReplayAll replays all messages stored on a replay log. 32 PersistentReplayAll = "REPLAY_ALL" 33 // PersistentReplayTimeBased replays all messages stored on a replay log after the specified date. 34 PersistentReplayTimeBased = "REPLAY_TIME_BASED" 35 // PersistentReplayIDBased replays all the messages stored on a replay log after the given message ID. 36 PersistentReplayIDBased = "REPLAY_ID_BASED" 37 ) 38 39 // MissingResourcesCreationStrategy represents the various missing resource 40 // creation strategies available to publishers requiring guaranteed resources. 41 type MissingResourcesCreationStrategy string 42 43 const ( 44 // PersistentReceiverDoNotCreateMissingResources disables any attempt to create the missing 45 // resource and is the default missing resource strategy. This value is 46 // recommended for production. 47 PersistentReceiverDoNotCreateMissingResources MissingResourcesCreationStrategy = "DO_NOT_CREATE" 48 // PersistentReceiverCreateOnStartMissingResources attempts to create missing resources 49 // once a connection is established, and only for resources known at that 50 // time. 51 PersistentReceiverCreateOnStartMissingResources MissingResourcesCreationStrategy = "CREATE_ON_START" 52 ) 53 54 // The available acknowledgement strategies used on a PersistentMessageReceiver. 55 const ( 56 // PersistentReceiverAutoAck acknowledge the message automatically. 57 PersistentReceiverAutoAck = "AUTO_ACK" 58 // PersistentReceiverClientAck does not acknowledge the message and messages instead needs to be 59 // acknowledged with PersistentMessageReceiver::Ack. 60 PersistentReceiverClientAck = "CLIENT_ACK" 61 ) 62