sendgrid dropping mails when adding 1000 mail ids to x-smtpapi - sendgrid

I am trying to add 1000 ids to x-smtpapi header. It is dropping out 20 mails in every run.
using the latest library.
and code : myMessage.Headers.Add("x-smtpapi", header.JsonString());
I also tried inserting new line in place of comma, even then it drops out 20 mail ids in every run.
Sample dropped event list is as below. Have anyone faced the problem?
i 2016-03-17T16:48:01.000Z 2016-03-17T16:48:45.806Z 56eadfed6f31a23c66609e2e Invalid NikhilMysore008 dropped
JhieqlJdTfOuulniB77Itw#ismtpd0017p1sin1.sendgrid.net 59LKtSyLRvCQHT0JgZ7zlw 1458233280 filter0576p1mdw1.32212.56EADFA29.957 nikhil 2016-03-17T16:48:00.000Z 2016-03-17T16:48:45.800Z 56eadfed6f31a23c66609e0d Invalid NikhilMysore008 dropped
JhieqlJdTfOuulniB77Itw#ismtpd0017p1sin1.sendgrid.net e8c99aoaRFyfrkkz-0wbhg 1458233280 filter0576p1mdw1.32212.56EADFA29.924 nikhil0 2016-03-17T16:48:00.000Z 2016-03-17T16:48:45.794Z 56eadfed6f31a23c66609dec Invalid NikhilMysore008 dropped
JhieqlJdTfOuulniB77Itw#ismtpd0017p1sin1.sendgrid.net sAw_-aVORmO1wS6q7UPFPw 1458233279 filter0576p1mdw1.32212.56EADFA29.891 nikhil00 2016-03-17T16:47:59.000Z 2016-03-17T16:48:45.788Z 56eadfed6f31a23c66609dcb Invalid NikhilMysore008 dropped
JhieqlJdTfOuulniB77Itw#ismtpd0017p1sin1.sendgrid.net S9vnTT4qTFaoLeHk-sRu3w 1458233278 filter0576p1mdw1.32212.56EADFA29.858 nikhil008 2016-03-17T16:47:58.000Z 2016-03-17T16:48:45.783Z 56eadfed6f31a23c66609daa Invalid NikhilMysore008 dropped
JhieqlJdTfOuulniB77Itw#ismtpd0017p1sin1.sendgrid.net V2AwE_9tT8Krft22rOjqyA 1458233277 filter0576p1mdw1.32212.56EADFA29.825 nikhil0082 2016-03-17T16:47:57.000Z 2016-03-17T16:48:45.777Z 56eadfed6f31a23c66609d89 Invalid NikhilMysore008 dropped
JhieqlJdTfOuulniB77Itw#ismtpd0017p1sin1.sendgrid.net LYPPsiyiTLqvAFW_bGFHTg 1458233275 filter0576p1mdw1.32212.56EADFA29.726 nikhil00727#m 2016-03-17T16:47:55.000Z 2016-03-17T16:48:45.759Z 56eadfed6f31a23c66609d26 Invalid NikhilMysore008 dropped
JhieqlJdTfOuulniB77Itw#ismtpd0017p1sin1.sendgrid.net 7kd8QhwGRpCgi6w5QblknQ 1458233273 filter0576p1mdw1.32212.56EADFA29.693 nikhil00694#ma
Can see misformed email ids in the event logs.
Nikhil

JhieqlJdTfOuulniB77Itw#ismtpd0017p1sin1.sendgrid.net means that you're sending to JhieqlJdTfOuulniB77Itw, which is an invalid address. What in your system is generating that code?
When sending a large X-SMTPAPI header, make sure you're wrapping the lines with a CRLF (\r\n). THat way they'll be unwrapped & processed properly.

Related

QuickFIX/J is removing tags from FIX message

Is it possible for QuickFIX/J to remove some tags of the incoming FIX message? If yes, why would it be like that?
The problem is when receiving 35=X (MarketDataIncrementalRefresh) message. The message comes from the server, and has the corresponding tangs, including the tags 48 SecurityID and 22 SecurityIDSource and the checksum is the correct one, calculated including those 2 fields. When processing the message in the client, the message does no longer contain the 48 and 22 tags and the checksum is also different. Because of those 2 missing tags, that are required, the client cannot process the message. I couldn't trace the cause of this. (The data dictionary contains the tags 22 and 48 and are marked as required).
The session config:
[session]
BeginString=FIXT.1.1
SocketConnectPort=9122
UseDataDictionary=Y
AllowUnknownMsgFields=Y
ValidateFieldsOutOfOrder=N
ValidateUnorderedGroupFields=N
ValidateIncomingMessage=N
TransportDataDictionary=transport_dict_FIXT11.xml
AppDataDictionary=data_dict_FIX44.xml
SocketUseSSL=Y
EnabledProtocols=TLSv1.2
SocketKeyStore=file.jks
SocketKeyStorePassword=password
Example of message from log:
Failed to process 8=FIXT.1.1|9=145|35=X|34=226|49=SenderCompID|52=20201202-13:42:34.345|56=TargetCompID|262=EU000A1U99281083|268=1|279=0|264=1|269=0|278=EU000A1U9928_BID_1|110=1000|10=217:
quickfix.FieldNotFound: Field [48] was not found in message.

SOAP Web Service Client error, While consuming the service

I am getting this error while using SOAP web service client with axis 1. I had created stub from the wsdl file and tried to consume it then I got this error. wsdl is given to me by someone else.
error in msg parsing: xml was empty, did't parse!
below is the error message and stack trace for the same. Anyone can help.?
In order to fix the javax.activation.DataHandler issue you must add the JavaBeans Activation Framework activation.jar in your classpath.
In order to fix the javax.mail.internet.mimeMultipart issue you must add the Java Mail API mail.jar in your classpath.
The warning messages printed in your console shows that the above jars are not in the classpath.
There are several common reasons to receive the message:
error in msg parsing: xml was empty, did't parse!
The most obvious is that no message was sent. If you have some way of inspecting your transport channel, that would be worth looking at.
Also, the xml message could have been sent in an unexpected character set, e.g. A header declares it to be "Utf-8" but it is really "Win-1252", sometimes you can get away with that if you only use 7-bit ASCII characters, but anything in the 8-bit plane will cause it to bomb.
Also, the xml message could have had a byte order mark unexpectedly inserted at the beginning of the message.
Also, the xml message might not have the document declaration ( starting in the first byte of the message, that violates the specification, and often causes parsers to puke and claim that no message was found.
All things considered with this error message, the parser was not able to find a valid xml message that it could parse, so it didn't. You need to grab the data on the transport channel and figure out what exactly is wrong to resolve the issue.

quickfixn executionreport 35=8 in message log but didn't hit fromapp or crack

So we send a FIX deal message without a side, and the bank rejects with a 35=8 execution report with 150=8 reject, and text FIX Tag 54 (Side) has invalid value (0). Reason (should be either 1 or 2) and then a 35=3 reject message with Value is incorrect (out of range) for this tag. The 35=3 message is cracked but the 35=8 message never gets to fromapp.
Am I missing a setting?
35=3 indicates a transport-level (aka admin-level) reject. The message was rejected at a lower parsing layer, which means that it's so malformed that it wasn't even passed up to your application.
Usually this kind of reject means that the message was messed up in a way such that the engine can't even parse it correctly, or that the header fields can't resolve to a known session. I'm a little surprised that your particular situation triggered a 35=3 instead of a 35=j.
I suppose you could check the FIX spec to see what it mandates when an enum-type tag has an unknown value. Maybe the engine is following spec in this case?
I guess the reason why the 35=8 message with the incorrect 54=0 tag doesn't get to FromApp or FromAdmin is because of a data dictionary constraint, but this gave me a chance to implement the public void FromEarlyIntercept(Message msg, SessionID s) interface, and that has solved the problem that a bad 35=8 report is now reported back to the user... but introduced a new problem that a good report is now reported twice.
So I added <value enum="0" description="ERROR"/> to the enumeration for <field number="54" name="Side" type="CHAR"> and now the 35=8 message is not rejected by a 35=3 message.

FIX Message Can 35=X does not have Symbol or SecID/SecIDSource

Hi I need help to understand, if 35=X message should contain Symbol/SecID within the repeating group.
The FIX Specification indicates that under the repeating group both 55 and 48/22 are optional.
I received a message from my client without a symbol tag, please help me undersatnd if that was a bad formed message
20150923-15:06:14.976 : 8=FIXT.1.19=33635=X34=19153349=SENDER52=20150923-15:06:14.63756=RECEIVER268=8279=0269=1270=99.609375271=289279=0269=1270=99.6171875271=241279=0269=1270=99.625271=154279=0269=1270=99.6328125271=139279=0269=0270=99.6015625271=268279=0269=0270=99.59375271=244279=0269=0270=99.5859375271=171279=0269=0270=99.578125271=21610=198
You are advised to treat the default FIX message and field definitions as a set of suggested definitions.
In practice, no commercial FIX counterparty uses these definitions as-is. Every counterparty I've connected to makes modifications, adding or removing fields from messages or groups, creating new fields, or sometimes adding entirely new messages. No counterparty supports every message and field.
When connecting to a counterparty, do not assume anything. Your counterparty should provide documentation on how they expect their interface to be used, and which messages and fields they will send and which they expect to receive from you.
You need to read their specs and modify your FIXnn.xml DataDictionary file to match what they will be sending you.
If their spec says they will send you Symbol and/or SecurityID in a 35=X message, you need to make sure your DD file matches that.
This page might be helpful to you. (It's technically for the C# QuickFIX/n, but the DD file is the same for all QF versions.)
http://quickfixn.org/tutorial/custom-fields-groups-and-messages.html

QuickFixn Outgoing Connection

I was hoping someone can shed some light on how the Quickfixn engine handles outgoing FIX messages... I have an outgoing connection set up, and I'm getting heartbeats. When I generate an outgoing message however, it gets rejected because it says that tag 58 is invalid for this message type... (35=AE) ... Normally, if this was an inbound connection, I could just modify the Data Dictionary and everything would be fine... but seeing as how this is an outgoing connection, plus I have my
UseDataDictionary property set to 'N' ... what does the quickfix engine use to validate the outgoing message? Can something be changed to allow the engine to pass the message ? Or is the only resolution not to include this tag in my outgoing message?
Any help on this matter would be greatly appreciated.
Edit-
The message is getting rejected by the quickfix engine. The message that I'm constructing and the respective reject message are:
8=FIX.4.4 9=400 35=AE 34=38 49=XXX 52=20130528-23:11:04.040 56=YYY 31=1.3022 32=1000000.00 39=0 55=EUR/USD 58=ABCD 60=20130528-22:34:52.000 64=20130531 75=20130529 570=N 571=ABCD 5495=0 5971=1302200.00 552=1 54=2 37=ABCD 453=3 448=LP1-DBAB 447=D 452=17 448=XXX 447=D 452=1 448=XXX 447=D 452=19 15=EUR 120=USD 10=082
8=FIX.4.4 9=130 35=3 34=38 49=YYY 52=20130528-23:11:04.283 56=XXX 45=38 58=Tag not defined for this message type 371=58 372=AE 373=2 10=033
I've seen incoming messages get rejected by the quickfix engine because the data dictionary didn't have the correct specs for the message... I thought this might be the same thing but the outgoing connection doesn't seem to use the data dictionary.
Your FIX library does not reject a message. The message is sent to the counter-party instead, which then rejects your message as invalid upon receiving and validating it. And the reason for that is because tag 58, if present, must be a part of “NoSides repeating group (tag 552), which in your case it is not, making the message ill-formed. What you have to do is send a "logically" correct message. I recommend you refer to the appropriate FIX protocol specification for a reference on how to construct a correct message.
Vlad's answer is correct, but I want to alert you to one other danger in your question.
I have my UseDataDictionary property set to 'N'
I am 90% sure you don't want to do this. Whatever you think you're gaining by using =N is probably based on a misunderstanding of something.
Without a DD, you can't read messages with repeating groups, because the engine won't know what fields go in what group.
In practice, every venue uses repeating groups. Therefore, you'll need to set UseDataDictionary=Y and you need to specify an xml file with DataDictionary=<file>.
The only reason we allow =N in QF/n is to be consistent with QF/C++ and QF/j.