Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 789d8f3

Browse files
committed
[client] Implement confirm delivery on bundle sending
1 parent 297a574 commit 789d8f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pycti/connector/opencti_connector_helper.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def run(self) -> None:
310310
try:
311311
self.channel.confirm_delivery()
312312
except Exception as err: # pylint: disable=broad-except
313-
LOGGER.error("%s", err)
313+
LOGGER.warning("%s", err)
314314
self.channel.basic_qos(prefetch_count=1)
315315
assert self.channel is not None
316316
self.channel.basic_consume(
@@ -1015,6 +1015,10 @@ def send_stix2_bundle(self, bundle, **kwargs) -> list:
10151015
)
10161016
pika_connection = pika.BlockingConnection(pika_parameters)
10171017
channel = pika_connection.channel()
1018+
try:
1019+
channel.confirm_delivery()
1020+
except Exception as err: # pylint: disable=broad-except
1021+
LOGGER.warning("%s", err)
10181022
for sequence, bundle in enumerate(bundles, start=1):
10191023
self._send_bundle(
10201024
channel,

0 commit comments

Comments
 (0)