acltdtBindQueueRoutes

Description

Binds data forwarding routes between queues when an app requires one-to-many data distribution.

As shown in the following figure, two routes (Q1 -> Q2 and Q1 -> Q3) can be established.

Restrictions

  • When data is distributed in one-to-many mode, the transferred shared buffer data is not locked, and consumers cannot perform the inplace operation on the data. As shown in the preceding figure, if consumer 1 modifies the shared data, the data accessed by consumer 2 changes.
  • Whether an added queue route forms a loop will be checked. Loops are not allowed.
  • Multi-thread concurrent calling is not supported.

Prototype

aclError acltdtBindQueueRoutes(acltdtQueueRouteList *qRouteList)

Parameters

Parameter

Input/Output

Description

qRouteList

Input/Output

Pointer to the route list. This API call returns the route binding result.

Call acltdtCreateQueueRouteList to create data of the acltdtQueueRouteList type, and then call acltdtAddQueueRoute to add a route.

Returns

The value 0 indicates success, and other values indicate failure. For details, see aclError.

This API returns a success message only when all routes in a queue are successfully bound and the route status is normal. If any route fails to be bound, this API returns a failure message. To locate the failure, you can call acltdtGetQueueRoute to obtain each route from the route list, and call acltdtGetQueueRouteParam to query the binding status.