mirror of
https://github.com/postmannen/ctrl.git
synced 2025-03-05 06:46:48 +00:00
renamed subject.messageCh to subject.publishMessageCh
This commit is contained in:
parent
c2031a66e7
commit
3ff67a5f1f
4 changed files with 13 additions and 13 deletions
|
@ -105,7 +105,7 @@ type Subject struct {
|
|||
// to be published. The content on this channel have been routed here
|
||||
// from routeMessagesToPublish in *server.
|
||||
// This channel is only used for publishing processes.
|
||||
messageCh chan Message
|
||||
publishMessageCh chan Message
|
||||
}
|
||||
|
||||
// newSubject will return a new variable of the type subject, and insert
|
||||
|
@ -124,9 +124,9 @@ func newSubject(method Method, node string) Subject {
|
|||
}
|
||||
|
||||
return Subject{
|
||||
ToNode: node,
|
||||
Method: method,
|
||||
messageCh: make(chan Message),
|
||||
ToNode: node,
|
||||
Method: method,
|
||||
publishMessageCh: make(chan Message),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -139,9 +139,9 @@ func newSubjectNoVerifyHandler(method Method, node string) Subject {
|
|||
// Get the Event type for the Method.
|
||||
|
||||
return Subject{
|
||||
ToNode: node,
|
||||
Method: method,
|
||||
messageCh: make(chan Message),
|
||||
ToNode: node,
|
||||
Method: method,
|
||||
publishMessageCh: make(chan Message),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -688,9 +688,9 @@ func newSubjectAndMessage(m Message) (subjectAndMessage, error) {
|
|||
}
|
||||
|
||||
sub := Subject{
|
||||
ToNode: string(m.ToNode),
|
||||
Method: m.Method,
|
||||
messageCh: make(chan Message),
|
||||
ToNode: string(m.ToNode),
|
||||
Method: m.Method,
|
||||
publishMessageCh: make(chan Message),
|
||||
}
|
||||
|
||||
sam := subjectAndMessage{
|
||||
|
|
|
@ -749,7 +749,7 @@ func (p process) publishMessages(natsConn *nats.Conn) {
|
|||
return
|
||||
//}
|
||||
|
||||
case m := <-p.subject.messageCh:
|
||||
case m := <-p.subject.publishMessageCh:
|
||||
ticker.Reset(time.Second * time.Duration(p.configuration.KeepPublishersAliveFor))
|
||||
// Sign the methodArgs, and add the signature to the message.
|
||||
m.ArgSignature = p.addMethodArgSignature(m)
|
||||
|
|
|
@ -568,7 +568,7 @@ func (s *server) routeMessagesToPublisherProcess() {
|
|||
// put the message on that processes incomming message channel.
|
||||
if ok && !ctxCanceled {
|
||||
select {
|
||||
case proc.subject.messageCh <- m:
|
||||
case proc.subject.publishMessageCh <- m:
|
||||
er := fmt.Errorf(" ** routeMessagesToProcess: passed message: %v to existing process: %v", m.ID, proc.processName)
|
||||
s.errorKernel.logDebug(er)
|
||||
case <-proc.ctx.Done():
|
||||
|
@ -607,7 +607,7 @@ func (s *server) routeMessagesToPublisherProcess() {
|
|||
// Now when the process is spawned we continue,
|
||||
// and send the message to that new process.
|
||||
select {
|
||||
case proc.subject.messageCh <- m:
|
||||
case proc.subject.publishMessageCh <- m:
|
||||
er := fmt.Errorf(" ** routeMessagesToProcess: passed message: %v to the new process: %v", m.ID, proc.processName)
|
||||
s.errorKernel.logDebug(er)
|
||||
case <-proc.ctx.Done():
|
||||
|
|
Loading…
Add table
Reference in a new issue