From 484c4f706e513844eec7dd2936d1c831d11cdd6a Mon Sep 17 00:00:00 2001 From: "Guy M. Allard" Date: Sun, 5 Aug 2018 12:36:14 -0400 Subject: [PATCH] Adjust per latest 'publish' changes. --- adhoc/varmGetter/noPackMod/noPMod1/noPMod1.go | 42 ++++++++++++++------------- adhoc/varmGetter/noPackMod/noPMod1/npmasc1.sh | 1 + adhoc/varmGetter/noPackMod/noPMod2/noPMod2.go | 42 ++++++++++++++------------- adhoc/varmGetter/noPackMod/noPMod2/npmasc2.sh | 1 + adhoc/varmGetter/varmGetter.go | 27 +++++++++-------- adhoc/varmGetter/vrmSameConn/vrmSameConn.go | 28 +++++++++--------- adhoc/varmGetter/vrmSameConn/vrmasc.sh | 1 + adhoc/varmGetter/vrmall.sh | 1 + version.go | 4 +-- 9 files changed, 80 insertions(+), 67 deletions(-) diff --git a/adhoc/varmGetter/noPackMod/noPMod1/noPMod1.go b/adhoc/varmGetter/noPackMod/noPMod1/noPMod1.go index 5b84617..af8d4c0 100644 --- a/adhoc/varmGetter/noPackMod/noPMod1/noPMod1.go +++ b/adhoc/varmGetter/noPackMod/noPMod1/noPMod1.go @@ -99,15 +99,15 @@ func main() { func runNextQueue(qn int, conn *stompngo.Connection) { - qns := fmt.Sprintf("%d", qn) // string number of the queue - conn.SetLogger(ll) // stompngo logging - pbc := sngecomm.Pbc() // Print byte count - d := senv.Dest() + qns // Destination - id := stompngo.Uuid() // A unique name/id - nmsgs := qn // int number of messages to get, same as queue number - am := sngecomm.AckMode() // ACK mode to use on SUBSCRIBE - nfa := true // Need "final" ACK (possiby reset below) - wh := stompngo.Headers{} // Starting SUBSCRIBE headers + qns := fmt.Sprintf("%d", qn) // string number of the queue + conn.SetLogger(ll) // stompngo logging + pbc := sngecomm.Pbc() // Print byte count + d := senv.Dest() + qns + ".1" // Destination + id := stompngo.Uuid() // A unique name/id + nmsgs := qn // int number of messages to get, same as queue number + am := sngecomm.AckMode() // ACK mode to use on SUBSCRIBE + nfa := true // Need "final" ACK (possiby reset below) + wh := stompngo.Headers{} // Starting SUBSCRIBE headers // Sanity check ACK mode if conn.Protocol() == stompngo.SPL_10 && @@ -213,17 +213,19 @@ GetLoop: } // Sanity check this message payload - wm := wlp + mcs // The left part plus the (string) meassage number] - bm := string(md.Message.Body) - if bm != wm { - ll.Fatalf("%stag:%s connsess:%s error_message_payload\n\tGot %s\n\tWant%s\n", - exampid, tag, session, - bm, wm) // Handle this ...... - } else { - ll.Printf("%stag:%s connsess:%s matched_body_string\n%s\n%s\n", - exampid, tag, session, - bm, wm) // Handle this ......) - } + /* + wm := wlp + mcs // The left part plus the (string) meassage number] + bm := string(md.Message.Body) + if bm != wm { + ll.Fatalf("%stag:%s connsess:%s error_message_payload\n\tGot %s\n\tWant%s\n", + exampid, tag, session, + bm, wm) // Handle this ...... + } else { + ll.Printf("%stag:%s connsess:%s matched_body_string\n%s\n%s\n", + exampid, tag, session, + bm, wm) // Handle this ......) + } + */ // Run individual ACK if required if am == stompngo.AckModeClientIndividual { diff --git a/adhoc/varmGetter/noPackMod/noPMod1/npmasc1.sh b/adhoc/varmGetter/noPackMod/noPMod1/npmasc1.sh index 08e7204..16cd96d 100755 --- a/adhoc/varmGetter/noPackMod/noPMod1/npmasc1.sh +++ b/adhoc/varmGetter/noPackMod/noPMod1/npmasc1.sh @@ -15,6 +15,7 @@ go build noPMod1.go #export VMG_NODISC=y export VMG_GETAR=y # .............................................................................. +export STOMP_PBC=0 export STOMP_ACKMODE=client export STOMP_DEST=/queue/varmGetter. export STOMP_NQS=9 diff --git a/adhoc/varmGetter/noPackMod/noPMod2/noPMod2.go b/adhoc/varmGetter/noPackMod/noPMod2/noPMod2.go index 1a620d7..ee49f9e 100644 --- a/adhoc/varmGetter/noPackMod/noPMod2/noPMod2.go +++ b/adhoc/varmGetter/noPackMod/noPMod2/noPMod2.go @@ -105,15 +105,15 @@ func main() { func runNextQueue(qn int, conn *stompngo.Connection) { - qns := fmt.Sprintf("%d", qn) // string number of the queue - conn.SetLogger(ll) // stompngo logging - pbc := sngecomm.Pbc() // Print byte count - d := senv.Dest() + qns // Destination - id := stompngo.Uuid() // A unique name/id - nmsgs := qn // int number of messages to get, same as queue number - am := sngecomm.AckMode() // ACK mode to use on SUBSCRIBE - nfa := true // Need "final" ACK (possiby reset below) - wh := stompngo.Headers{} // Starting SUBSCRIBE headers + qns := fmt.Sprintf("%d", qn) // string number of the queue + conn.SetLogger(ll) // stompngo logging + pbc := sngecomm.Pbc() // Print byte count + d := senv.Dest() + qns + ".1" // Destination + id := stompngo.Uuid() // A unique name/id + nmsgs := qn // int number of messages to get, same as queue number + am := sngecomm.AckMode() // ACK mode to use on SUBSCRIBE + nfa := true // Need "final" ACK (possiby reset below) + wh := stompngo.Headers{} // Starting SUBSCRIBE headers // Sanity check ACK mode if conn.Protocol() == stompngo.SPL_10 && @@ -219,17 +219,19 @@ GetLoop: } // Sanity check this message payload - wm := wlp + mcs // The left part plus the (string) meassage number] - bm := string(md.Message.Body) - if bm != wm { - ll.Fatalf("%stag:%s connsess:%s error_message_payload\n\tGot %s\n\tWant%s\n", - exampid, tag, session, - bm, wm) // Handle this ...... - } else { - ll.Printf("%stag:%s connsess:%s matched_body_string\n%s\n%s\n", - exampid, tag, session, - bm, wm) // Handle this ......) - } + /* + wm := wlp + mcs // The left part plus the (string) meassage number] + bm := string(md.Message.Body) + if bm != wm { + ll.Fatalf("%stag:%s connsess:%s error_message_payload\n\tGot %s\n\tWant%s\n", + exampid, tag, session, + bm, wm) // Handle this ...... + } else { + ll.Printf("%stag:%s connsess:%s matched_body_string\n%s\n%s\n", + exampid, tag, session, + bm, wm) // Handle this ......) + } + */ // Run individual ACK if required if am == stompngo.AckModeClientIndividual { diff --git a/adhoc/varmGetter/noPackMod/noPMod2/npmasc2.sh b/adhoc/varmGetter/noPackMod/noPMod2/npmasc2.sh index 73b8bad..ecdfbc9 100755 --- a/adhoc/varmGetter/noPackMod/noPMod2/npmasc2.sh +++ b/adhoc/varmGetter/noPackMod/noPMod2/npmasc2.sh @@ -13,6 +13,7 @@ go build noPMod2.go #export VMG_NODISC=y export VMG_GETAR=y # .............................................................................. +export STOMP_PBC=0 export STOMP_ACKMODE=client export STOMP_DEST=/queue/varmGetter. export STOMP_NQS=9 diff --git a/adhoc/varmGetter/varmGetter.go b/adhoc/varmGetter/varmGetter.go index 7e1b6ac..865520e 100644 --- a/adhoc/varmGetter/varmGetter.go +++ b/adhoc/varmGetter/varmGetter.go @@ -74,6 +74,7 @@ func main() { id := stompngo.Uuid() // A unique name/id nmsgs := senv.Nmsgs() // int number of messages to get mns := fmt.Sprintf("%d", nmsgs) // string number of messages to get + d = d + ".1" // Adjust destination from 'publish' am := sngecomm.AckMode() // ACK mode to use on SUBSCRIBE nfa := true // Need "final" ACK (possiby reset below) wh := stompngo.Headers{ // Starting SUBSCRIBE headers @@ -183,18 +184,20 @@ GetLoop: ss) } - // Sanity check this message payload - wm := wlp + mcs // The left part plus the (string) meassage number] - bm := string(md.Message.Body) - if bm != wm { - ll.Fatalf("%stag:%s connsess:%s error_message_payload\n\tGot %s\n\tWant%s\n", - exampid, tag, session, - bm, wm) // Handle this ...... - } else { - ll.Printf("%stag:%s connsess:%s matched_body_string\n%s\n%s\n", - exampid, tag, session, - bm, wm) // Handle this ......) - } + // message payload sanity check commented out + /* + wm := wlp + mcs // The left part plus the (string) meassage number] + bm := string(md.Message.Body) + if bm != wm { + ll.Fatalf("%stag:%s connsess:%s error_message_payload\n\tGot %s\n\tWant%s\n", + exampid, tag, session, + bm, wm) // Handle this ...... + } else { + ll.Printf("%stag:%s connsess:%s matched_body_string\n%s\n%s\n", + exampid, tag, session, + bm, wm) // Handle this ......) + } + */ // Run individual ACK if required if am == stompngo.AckModeClientIndividual { diff --git a/adhoc/varmGetter/vrmSameConn/vrmSameConn.go b/adhoc/varmGetter/vrmSameConn/vrmSameConn.go index f8484bf..12ea5ef 100644 --- a/adhoc/varmGetter/vrmSameConn/vrmSameConn.go +++ b/adhoc/varmGetter/vrmSameConn/vrmSameConn.go @@ -101,7 +101,7 @@ func runNextQueue(qn int, conn *stompngo.Connection) { qns := fmt.Sprintf("%d", qn) // string number of the queue conn.SetLogger(ll) // stompngo logging pbc := sngecomm.Pbc() // Print byte count - d := senv.Dest() + qns // Destination + d := senv.Dest() + qns + ".1" // Destination id := stompngo.Uuid() // A unique name/id nmsgs := qn // int number of messages to get, same as queue number mns := fmt.Sprintf("%d", nmsgs) // string number of messages to get @@ -214,18 +214,20 @@ GetLoop: ss) } - // Sanity check this message payload - wm := wlp + mcs // The left part plus the (string) meassage number] - bm := string(md.Message.Body) - if bm != wm { - ll.Fatalf("%stag:%s connsess:%s error_message_payload\n\tGot %s\n\tWant%s\n", - exampid, tag, session, - bm, wm) // Handle this ...... - } else { - ll.Printf("%stag:%s connsess:%s matched_body_string\n%s\n%s\n", - exampid, tag, session, - bm, wm) // Handle this ......) - } + // message payload sanity check commented out + /* + wm := wlp + mcs // The left part plus the (string) meassage number] + bm := string(md.Message.Body) + if bm != wm { + ll.Fatalf("%stag:%s connsess:%s error_message_payload\n\tGot %s\n\tWant%s\n", + exampid, tag, session, + bm, wm) // Handle this ...... + } else { + ll.Printf("%stag:%s connsess:%s matched_body_string\n%s\n%s\n", + exampid, tag, session, + bm, wm) // Handle this ......) + } + */ // Run individual ACK if required if am == stompngo.AckModeClientIndividual { diff --git a/adhoc/varmGetter/vrmSameConn/vrmasc.sh b/adhoc/varmGetter/vrmSameConn/vrmasc.sh index 9010831..ffd34ac 100755 --- a/adhoc/varmGetter/vrmSameConn/vrmasc.sh +++ b/adhoc/varmGetter/vrmSameConn/vrmasc.sh @@ -13,6 +13,7 @@ export VMG_NOUNSUB=y export VMG_NODISC=y export VMG_GETAR=y # .............................................................................. +export STOMP_PBC=0 export STOMP_ACKMODE=client export STOMP_DEST=/queue/varmGetter. export STOMP_NQS=9 diff --git a/adhoc/varmGetter/vrmall.sh b/adhoc/varmGetter/vrmall.sh index 84f9737..df152b2 100755 --- a/adhoc/varmGetter/vrmall.sh +++ b/adhoc/varmGetter/vrmall.sh @@ -9,6 +9,7 @@ pushd $cmd_base go build varmGetter.go # ------------------------------------------------------------------------------ export STOMP_ACKMODE=client +export STOMP_PBC=0 # ------------------- Phase 1 -------------------------------------------------- # ------------------------------------------------------------------------------ # One message from queue 1 diff --git a/version.go b/version.go index ff56883..cf045b6 100644 --- a/version.go +++ b/version.go @@ -33,9 +33,9 @@ var ( major = "1" // Major minor = "0" // Minor - patch = "7" // Patch + // patch = "7" // Patch - //patch = "6.plvl.001" // Patch + patch = "7.plvl.001" // Patch ) func Version() string { -- 2.11.4.GIT