From 5c67c7c7e0ed17412d7fdd1a4ac5d601563fd879 Mon Sep 17 00:00:00 2001 From: Geir Horn Date: Wed, 14 Feb 2024 22:00:36 +0100 Subject: [PATCH] Final first release now with application ID filtering effective Change-Id: Ief16b069c20394f3f48dcd038b57766b6c3771c0 --- SolverComponent.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/SolverComponent.cpp b/SolverComponent.cpp index 0f06968..2d5d7bb 100644 --- a/SolverComponent.cpp +++ b/SolverComponent.cpp @@ -228,31 +228,31 @@ int main( int NumberOfCLIOptions, char ** CLIOptionStrings ) // example for an earlier Proton version (0.32.0) and the example at // https://qpid.apache.org/releases/qpid-proton-0.32.0/proton/cpp/examples/selected_recv.cpp.html - // virtual proton::receiver_options ReceiverOptions( void ) const override - // { - // proton::source::filter_map TheFilter; - // proton::source_options TheSourceOptions; - // proton::symbol FilterKey("selector"); - // proton::value FilterValue; - // proton::codec::encoder EncodedFilter( FilterValue ); - // proton::receiver_options TheOptions( - // Theron::AMQ::NetworkLayer::AMQProperties::ReceiverOptions() ); + virtual proton::receiver_options ReceiverOptions( void ) const override + { + proton::source::filter_map TheFilter; + proton::source_options TheSourceOptions; + proton::symbol FilterKey("selector"); + proton::value FilterValue; + proton::codec::encoder EncodedFilter( FilterValue ); + proton::receiver_options TheOptions( + Theron::AMQ::NetworkLayer::AMQProperties::ReceiverOptions() ); - // std::ostringstream SelectorString; + std::ostringstream SelectorString; - // SelectorString << "application = '" << ApplicationID << "'"; + SelectorString << "application = '" << ApplicationID << "'"; - // EncodedFilter << proton::codec::start::described() - // << proton::symbol("apache.org:selector-filter:string") - // << SelectorString.str() - // << proton::codec::finish(); + EncodedFilter << proton::codec::start::described() + << proton::symbol("apache.org:selector-filter:string") + << SelectorString.str() + << proton::codec::finish(); - // TheFilter.put( FilterKey, FilterValue ); - // TheSourceOptions.filters( TheFilter ); - // TheOptions.source( TheSourceOptions ); + TheFilter.put( FilterKey, FilterValue ); + TheSourceOptions.filters( TheFilter ); + TheOptions.source( TheSourceOptions ); - // return TheOptions; - // } + return TheOptions; + } // The application identifier must also be provided in every message to // allow other receivers to filter on this.