Skip to content

Clarify message-related FFI #440

@JP-Ellis

Description

@JP-Ellis

Summary

We need to clarify how the Foreign Function Interface (FFI) should be used in relation to message interactions. Currently, there is confusion regarding the purpose and distinction between the following elements:

  • PactHandle vs MessagePactHandle
  • InteractionHandle vs MessageHandle

Motivation

Recent contributions to Pact Python have added support for message pacts using the FFI library, which has been greatly appreciated. However, this has also highlighted some ambiguities in how best to use the FFI for message interactions. Clarifying these distinctions will improve usability and reduce confusion for developers.

Proposed Solution

The goal is to deprecate MessagePactHandle in favor of PactHandle, and MessageHandle in favor of InteractionHandle. Where overlapping functionality exists, a simple deprecation notice will be sufficient initially.

In cases where functionality exclusive to MessagePactHandle or MessageHandle needs to be incorporated into their respective replacements (PactHandle or InteractionHandle), those features should be added before deprecation.

Tasks

  • feat(ffi): add with_metadata #439

  • to identify

  • Document how FFI should be used when verifying message pacts

    Once the FFI is disambiguated, there is still a need for a clear description as to how messages should be verified by the upstream languages. This is needed because the transport mechanism (e.g., queuing system) is abstracted away and the upstream language needs to handle that.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions