Currently, distributed traffic information systems have come up as one of the most important approaches for detecting traffic flow problems on a road. For that purpose, they usually make use of the location information that vehicles share among them through periodical messages that are transmitted across a vehicular ad hoc network (VANET). This paper puts forward an event-driven architecture (EDA) as a novel mechanism to get insight into VANET messages to detect different levels of traffic jams; furthermore, it also takes into account environmental data that come from external data sources, such as weather conditions. The proposed EDA has been developed through the complex-event-processing technology. Simulation tests show that the proposed mechanism can detect traffic congestions, which involve different numbers of lanes and lengths with short delay