Skip to content

refs #10 - Add command to start a workflow#11

Open
mventuravoyageprive wants to merge 3 commits intopocfrom
dist_10
Open

refs #10 - Add command to start a workflow#11
mventuravoyageprive wants to merge 3 commits intopocfrom
dist_10

Conversation

@mventuravoyageprive
Copy link
Contributor

#10

*/
public static function start(string $workflowName, string $workflowId, array $payloadHash)
{
$brokers = 'localhost';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be taken from conf

public static function start(string $workflowName, string $workflowId, array $payloadHash)
{
$brokers = 'localhost';
$msg = '{"contract":"'.$workflowId.'", "type" : "WF-CONTROL", "action":"start"}';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be abstracted by the dto

$msg = '{"contract":"'.$workflowId.'", "type" : "WF-CONTROL", "action":"start"}';

//send message with givens params
$kafkaProducer = new \RdKafka\Producer();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be in di or even abstracted

//send message with givens params
$kafkaProducer = new \RdKafka\Producer();
$kafkaProducer->addBrokers($brokers);
$topicName = 'disturb-' . $workflowName . '-manager'; //xxx create service to manage topic name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#14 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants